-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yaml
137 lines (131 loc) · 3.12 KB
/
docker-compose.yaml
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
---
networks:
app:
x-chart-pregenerator:
host: &chart-host ${NODE_CHART_PREGENERATOR_HOST:-chartgenerator}
port: &chart-port ${NODE_CHART_PREGENERATOR_PORT:-3000}
services:
postgresql:
image: postgres:13
init: true
ports:
- "5432:5432"
volumes:
- ./:/django:ro
environment:
POSTGRES_PASSWORD: trackerpassword
POSTGRES_USER: tracker
POSTGRES_DB: trackerdb
user: postgres
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-U", "tracker", "--dbname", "trackerdb"]
timeout: 45s
interval: 10s
retries: 10
networks:
app:
aliases:
- db
selenium:
image: selenium/standalone-firefox-debug:latest
ports:
- "127.0.0.1::5900"
networks:
app:
aliases:
- selenium
node:
init: true
build:
context: .
dockerfile: devops/docker/NodeDockerfile
args:
NPM_VER: 9.6.7
USERID: ${UID:?err}
volumes:
- ./:/django
working_dir: /django
user: ${UID:?err}
healthcheck:
test: jq '.status' webpack-stats.json |grep -q -e compiling -e error -e done
interval: 10s
start_period: 1m30s
networks:
- app
node-chart-pregenerator:
init: true
build:
context: .
dockerfile: devops/docker/NodeChartPregeneratorDevDockerfile
args:
NPM_VER: 10.9.2
USERID: ${UID:?err}
volumes:
- ./:/django
- ./client:/app/client
- ./chart_pregenerator/src:/app/src
environment:
DJANGO_HOST: app
DJANGO_PORT: 8000
PORT: *chart-port
DEPLOY_ENV: dev
ports:
- target: *chart-port
published: *chart-port
user: ${UID:?err}
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:3000/"]
start_period: 10s
interval: 10s
timeout: 20s
retries: 4
networks:
app:
aliases:
- *chart-host
django:
init: true
stdin_open: true
tty: true
build:
context: .
dockerfile: devops/docker/DevDjangoDockerfile
args:
USERID: ${UID:?err}
depends_on:
node:
condition: service_healthy
postgresql:
condition: service_healthy
node-chart-pregenerator:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8000/health/ok/?monitor"]
start_period: 10s
interval: 30s
timeout: 20s
retries: 4
environment:
DJANGO_ALLOWED_HOSTS: app localhost
DJANGO_CREATEDEVDATA: "${DJANGO_CREATEDEVDATA:-no}"
DJANGO_DB_PASSWORD: trackerpassword
DJANGO_DB_USER: tracker
DJANGO_DB_NAME: trackerdb
DJANGO_DB_PORT: 5432
DJANGO_DB_HOST: db
DJANGO_XMLTEST_OUTPUT: "yes"
DEPLOY_ENV: dev
DJANGO_PROFILE: "${DJANGO_PROFILE:-no}"
PYINSTRUMENT: "${PYINSTRUMENT:-no}"
SELENIUM_HOST: selenium
DJANGO_CHART_HOST: node-chart-pregenerator
DJANGO_CHART_PORT: *chart-port
working_dir: /django
volumes:
- ./:/django
ports:
- "127.0.0.1:8000:8000"
networks:
app:
aliases:
- app