-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (64 loc) · 1.63 KB
/
docker-compose.yml
File metadata and controls
70 lines (64 loc) · 1.63 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
version: '3.9'
volumes:
postgres_data:
services:
storage:
image: 'postgres:15.3'
container_name: storage
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- ${POSTGRES_PORT}:5432
healthcheck:
test: [ 'CMD-SHELL', 'su postgres', '&&', 'pg_isready' ]
interval: 5s
timeout: 5s
retries: 20
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PASSWORD: ${DB_PASSWORD}
kpoint-back:
build:
context: .
dockerfile: Dockerfile
container_name: kpoint-back
ports:
- ${SERVER_PORT}:${SERVER_PORT}
environment:
- SERVER_PORT=${SERVER_PORT}
- DB_URL=${DB_URL}
- DB_USERNAME=${DB_USERNAME}
- DB_PASSWORD=${DB_PASSWORD}
- JWT_SECRET=${JWT_SECRET}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- OAUTH2_REDIRECT_URI=${OAUTH2_REDIRECT_URI}
healthcheck:
test:
[
'CMD-SHELL',
'curl -f http://localhost:${SERVER_PORT}/actuator/health || exit 1',
]
interval: 5s
timeout: 5s
retries: 20
start_period: 30s
depends_on:
storage:
condition: service_healthy
volumes:
- '/etc/localtime:/etc/localtime:ro'
kpoint-react:
build:
context: ./../kpoint-react
dockerfile: Dockerfile.prod
args:
REACT_APP_API_PATH: ${BACK_API_PATH}
REACT_APP_OAUTH2_GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
container_name: kpoint-react
depends_on:
kpoint-back:
condition: service_healthy
ports:
- ${HTTP_PORT}:${HTTP_PORT}