forked from jenkins-infra/plugin-health-scoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
37 lines (35 loc) · 841 Bytes
/
compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
services:
app:
build:
context: .
dockerfile: war/src/main/docker/Dockerfile
depends_on:
db:
condition: service_healthy
env_file:
- .env
environment:
- GITHUB_PRIVATEKEYPATH=/app/github-app-private-key.pem
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- SPRING_PROFILES_ACTIVE=dev
ports:
- "8080:8080"
volumes:
- "${GITHUB_APP_PRIVATE_KEY_PATH}:/app/github-app-private-key.pem:ro"
db:
image: postgres:14.1-alpine
restart: always
env_file:
- .env
healthcheck:
test: ["CMD", "pg_isready", "-p", "5432", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"]
interval: 5s
timeout: 2s
retries: 5
volumes:
- db_data:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT}:5432"
volumes:
db_data: