-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
69 lines (64 loc) · 1.47 KB
/
docker-compose.yaml
File metadata and controls
69 lines (64 loc) · 1.47 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
services:
mystbin:
image: ghcr.io/pythonistaguild/mystbin
container_name: mystbin
environment:
- CONFIG_PATH=/app-config
ports:
- 8181:8181
restart: unless-stopped
depends_on:
database:
condition: service_healthy
restart: true
configs:
- app-config
database:
image: postgres:16
container_name: mystbin-database
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
env_file: .env
environment:
- PG_DATA=/var/lib/postgresql/data
volumes:
- mystbin_pg_data:/var/lib/postgresql/data
user: "1000:1000"
db-backups:
image: postgres:16
container_name: db-backups
depends_on:
database:
condition: service_healthy
restart: true
env_file:
- .env
environment:
- PGPASSWORD=${POSTGRES_PASSWORD}
volumes:
- ./db-backup:/backups
- ./db-backup/backup.sh:/backup.sh
entrypoint: ["/bin/bash"]
command: "/backup.sh"
restart: unless-stopped
user: "1000:1000"
profiles:
- backup
redis:
image: redis:latest
container_name: mystbin-redis
restart: unless-stopped
profiles:
- redis
volumes:
- "./redis.conf:/config/redis.conf:ro"
command: ["redis-server", "/config/redis.conf"]
configs:
app-config:
file: ./config.toml
volumes:
mystbin_pg_data: