-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
57 lines (56 loc) · 1.37 KB
/
docker-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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
version: '3.8'
services:
dks-api:
image: ${APP_NAME}:${SHA_TAG:-localdev}
container_name: ${APP_NAME}
hostname: ${APP_NAME}
build:
context: .
dockerfile: Dockerfile
environment:
- SPRING_PROFILES_ACTIVE=local
- JAVA_ENABLE_DEBUG=${JAVA_ENABLE_DEBUG}
ports:
- '${APP_PORT}:8080'
- '${JAVA_DEBUG_PORT}:${JAVA_DEBUG_PORT}'
healthcheck:
test:
['CMD', 'curl', '-f', 'http://localhost:${APP_PORT}/actuator/health']
start_period: 20s
interval: 30s
retries: 3
timeout: 10s
networks:
- frontend
- backend
depends_on:
- dks-db
dks-db:
image: postgres:16.2-alpine@sha256:1d74239810c19ed0dbb317acae40974e673865b2d565a0d369e206159d483957
container_name: ${DB_CONTAINER_NAME}
hostname: ${DB_CONTAINER_NAME}
environment:
- PGPORT=${PGPORT:-5432}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
ports:
- ${PGPORT:-5432}:${PGPORT:-5432}
healthcheck:
test: ['CMD', 'pg_isready', '-U ${POSTGRES_USER}']
start_period: 30s
interval: 20s
retries: 3
timeout: 10s
volumes:
- dks-db-datastore:/var/lib/postgresql/data
networks:
- backend
networks:
frontend:
name: frontend
backend:
name: backend
volumes:
dks-db-datastore:
name: dks-db-datastore