-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (51 loc) · 1.13 KB
/
docker-compose.yml
File metadata and controls
54 lines (51 loc) · 1.13 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
services:
app:
container_name: app
environment:
DB_HOST: postgres
env_file:
- .env
build:
context: .
dockerfile: Dockerfile
ports:
- "16000:8000"
depends_on:
postgres:
condition: service_healthy
postgres:
hostname: postgres
image: postgres:14.1
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- ./scripts/postgres:/scripts
ports:
- "65432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-U", "${DB_USER}"]
interval: 10s
timeout: 5s
retries: 5
restart: no
db_backups:
container_name: DB_Backups
image: prodrigestivill/postgres-backup-local
restart: always
user: postgres:postgres
volumes:
- ./backups:/backups
links:
- postgres
depends_on:
- postgres
environment:
POSTGRES_HOST: postgres
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
SCHEDULE: "@every 12h0m00s"
BACKUP_KEEP_DAYS: 7
HEALTHCHECK_PORT: 81