-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (81 loc) · 1.82 KB
/
docker-compose.yml
File metadata and controls
81 lines (81 loc) · 1.82 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
version: "3.9"
services:
nginx:
image: nginx
volumes:
- "./nginx/logs:/var/log/nginx"
- "./nginx/nginx.conf:/etc/nginx/nginx.conf"
- "./ssl:/etc/nginx/ssl"
depends_on:
- app
deploy:
restart_policy:
condition: on-failure
max_attempts: 10
postgres:
image: postgres:latest
restart: always
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- ./data/clusters/pgdata:/var/lib/postgresql/data
expose:
- 5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
deploy:
restart_policy:
condition: on-failure
max_attempts: 10
pgbackup:
image: prodrigestivill/postgres-backup-local
restart: always
volumes:
- ./data/backups/pgbackup:/backups
links:
- postgres:postgres
depends_on:
- postgres
environment:
- POSTGRES_HOST=postgres
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_EXTRA_OPTS=-Z9 --schema=public --blobs
- SCHEDULE=@every 0h30m00s
- BACKUP_KEEP_DAYS=7
- BACKUP_KEEP_WEEKS=4
- BACKUP_KEEP_MONTHS=6
- HEALTHCHECK_PORT=81
redis:
image: redis:latest
restart: always
volumes:
- ./data/clusters/redisdata:/data
expose:
- 6379
healthcheck:
test: ["CMD-SHELL", "redis-cli -h redis ping"]
interval: 5s
deploy:
restart_policy:
condition: on-failure
max_attempts: 10
app:
image: gobot
build: .
expose:
- 3000
- 4000
depends_on:
- postgres
- redis
deploy:
restart_policy:
condition: on-failure
max_attempts: 10