-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose.yaml
42 lines (39 loc) · 976 Bytes
/
docker-compose.yaml
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
services:
mystbin:
image: ghcr.io/pythonistaguild/mystbin
container_name: mystbin
ports:
- 8181:8181
restart: unless-stopped
depends_on:
database:
condition: service_healthy
restart: true
volumes:
- ./config.toml:/app/config.toml:ro
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
- POSTGRES_DB=mystbin
volumes:
- mystbin_pg_data:/var/lib/postgresql/data
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"]
volumes:
mystbin_pg_data: