-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
96 lines (94 loc) · 2.67 KB
/
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
version: "3.8"
services:
gameserv:
build:
dockerfile: Dockerfile
context: gameserv/.
target: ${STAGE}
container_name: gameserv
ports:
- "4000:4000"
environment:
- GAME_IP=${GAME_IP}
- HTTP_METHOD=${HTTP_METHOD}
- HOST_NAME=${HOST_NAME}
- HOST_IP=${HOST_IP}
- USER_GID=${USER_GID}
volumes:
- ./debug/gameserv:/debug
restart: on-failure
react:
build:
dockerfile: Dockerfile
context: react/.
target: ${STAGE}
args:
REACT_APP_DJANGO_PORT: ${DJANGO_PORT}
REACT_APP_HOST_NAME: ${HOST_NAME}
REACT_APP_REDIRECT_URI: ${REDIRECT_URI}
REACT_APP_HTTP_METHOD: ${HTTP_METHOD}
GENERATE_SOURCEMAP: ${GENERATE_SOURCEMAP}
container_name: react
depends_on:
- django
environment:
- REACT_APP_GAME_IP=${GAME_IP}
- REACT_APP_DJANGO_PORT=${DJANGO_PORT}
- REACT_APP_HTTP_METHOD=${HTTP_METHOD}
- PORT=${REACT_PORT}
- REACT_APP_HOST_NAME=${HOST_NAME}
- REACT_APP_HOST_IP=${HOST_IP}
- REACT_APP_REDIRECT_URI=${REDIRECT_URI}
- USER_GID=${USER_GID}
- GENERATE_SOURCEMAP=${GENERATE_SOURCEMAP}
ports:
- "${REACT_PORT}:${REACT_PORT}"
volumes:
- ./debug/react:/debug/src
- ./media:/media
restart: on-failure
django:
build:
dockerfile: Dockerfile
context: django/.
target: ${STAGE}
container_name: django
depends_on:
postgresql:
condition: service_healthy
ports:
- "${DJANGO_PORT}:${DJANGO_PORT}"
volumes:
- ./debug/django:/debug/backend
- ./media:/app/media
environment:
- DJANGO_DEBUG=${DJANGO_DEBUG}
- HTTP_METHOD=${HTTP_METHOD}
- REACT_PORT=${REACT_PORT}
- CLIENT_ID=${CLIENT_ID}
- DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY}
- CLIENT_SECRET=${CLIENT_SECRET}
- HOST_IP=${HOST_IP}
- HOST_NAME=${HOST_NAME}
- USER_GID=${USER_GID}
- DJANGO_SUPERUSER_PASSWORD=${DJANGO_SUPERUSER_PASSWORD}
- DJANGO_SUPERUSER_EMAIL=${DJANGO_SUPERUSER_EMAIL}
- DJANGO_SUPERUSER_USERNAME=${DJANGO_SUPERUSER_USERNAME}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
restart: on-failure
postgresql:
build: postgres/.
container_name: postgresql
environment:
- PGDATA=${PGDATA}
- LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
restart: on-failure
healthcheck:
test: pg_isready -d django_db -U postgres -h postgresql -p 5432
interval: 5s
retries: 3