-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·60 lines (57 loc) · 1.28 KB
/
Copy pathdocker-compose.yml
File metadata and controls
executable file
·60 lines (57 loc) · 1.28 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
version: '3.4'
services:
py-api-srv:
build: py-srv/api
ports:
- 8000
healthcheck:
test: "exit 0"
command: sh -c "/wait && python app.py"
environment:
- WAIT_HOSTS=db:5432
- WAIT_HOSTS_TIMEOUT=300
- WAIT_SLEEP_INTERVAL=30
- WAIT_HOST_CONNECT_TIMEOUT=30
depends_on:
- db
links:
- "db:db"
py-web-srv:
build: py-srv/web
ports:
- 80:8000
healthcheck:
test: "exit 0"
command: sh -c "/wait && python app.py"
environment:
- WAIT_HOSTS=py-api-srv:8000
- WAIT_HOSTS_TIMEOUT=300
- WAIT_SLEEP_INTERVAL=30
- WAIT_HOST_CONNECT_TIMEOUT=30
depends_on:
- py-api-srv
links:
- "py-api-srv:py-api-srv"
py-test-srv:
build:
context: py-test-srv
command: sh -c "/wait && python app.py"
environment:
- WAIT_HOSTS=py-web-srv:8000
- WAIT_HOSTS_TIMEOUT=300
- WAIT_SLEEP_INTERVAL=30
- WAIT_HOST_CONNECT_TIMEOUT=30
depends_on:
- py-web-srv
links:
- "py-web-srv:py-web-srv"
db:
image: postgres:alpine
environment:
- POSTGRES_DB=animal
- POSTGRES_USER=maria
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- ./db/sql:/docker-entrypoint-initdb.d
healthcheck:
test: "exit 0"