-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-scale.yml
66 lines (61 loc) · 1.29 KB
/
docker-compose-scale.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
version: '3.8'
services:
scale-app:
image: dayvidwhy/scale-service:tag
ports:
- target: 3000
published: 80
protocol: tcp
mode: ingress
working_dir: /usr/src/app
environment:
- NODE_ENV=production
deploy:
replicas: 4
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
depends_on:
- db
- redis
db:
image: postgres:latest
volumes:
- pgdata:/var/lib/postgresql/data
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- target: 5432
published: 5432
protocol: tcp
mode: host
redis:
image: redis:latest
ports:
- target: 6379
published: 6379
protocol: tcp
mode: host
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
pgadmin:
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
ports:
- target: 80
published: 8080
protocol: tcp
mode: host
depends_on:
- db
volumes:
pgdata: