-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.develop.yml
More file actions
57 lines (54 loc) · 1.38 KB
/
docker-compose.develop.yml
File metadata and controls
57 lines (54 loc) · 1.38 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
services:
api:
# Locally built image:
image: minitwit-api:dev
environment:
- DATABASE_PATH=${DATABASE_PATH:-postgresql://myuser:mypassword@db:5432/mydb}
- LOG_LEVEL=${LOG_LEVEL}
- SIMULATOR_AUTH=${SIMULATOR_AUTH}
networks:
- minitwit-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5001/api/health"]
interval: 30s
timeout: 10s
retries: 3
deploy:
replicas: 2
restart_policy:
condition: on-failure
web:
# Locally built image:
image: minitwit-web:dev
environment:
- DATABASE_PATH=${DATABASE_PATH:-postgresql://myuser:mypassword@db:5432/mydb}
- LOG_LEVEL=${LOG_LEVEL}
- SIMULATOR_AUTH=${SIMULATOR_AUTH}
networks:
- minitwit-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000"]
interval: 30s
timeout: 10s
retries: 3
deploy:
replicas: 2
restart_policy:
condition: on-failure
nginx:
image: nginx:latest
ports:
- target: 80
published: 80
volumes:
- ./nginx.develop.conf:/etc/nginx/nginx.conf:ro
networks:
- minitwit-network
deploy:
placement:
constraints:
- node.role == manager
networks: # Network shared between services so we can refer to them by name
minitwit-network:
external: true
name: minitwit-network