-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
96 lines (96 loc) · 2.22 KB
/
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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
version: "3.7"
services:
sadFavBot:
build: .
image: kozalosev/sadfavbot
container_name: sadfavbot
restart: unless-stopped
environment:
- API_TOKEN
- DEBUG
- COMMAND_STATE_TTL
- INLINE_CACHE_TIME
- RESULTS_PER_PAGE
- APP_PORT
- APP_PATH
- REDIS_HOST
- REDIS_PORT
- REDIS_PASSWORD
- POSTGRES_HOST
- POSTGRES_PORT
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- MIGRATIONS_REPO
- WEBHOOK_HOST
- WEBHOOK_PORT
- WEBHOOK_PATH
- PHOTO_INLINE_EXAMPLE
- SELF_DELETION_DELAY_SECS
- BUTTONS_PER_ROW
expose:
- ${APP_PORT}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- postgres-network
- redis-network
labels:
- "com.centurylinklabs.watchtower.enable=true"
logging:
driver: local
postgres:
image: postgres:14.5-alpine
container_name: sadfavbot-postgresql
environment:
- POSTGRES_PORT
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- PGDATA=/var/lib/postgresql/data/pgdata
expose:
- ${POSTGRES_PORT}
volumes:
- ./data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
networks:
- postgres-network
logging:
driver: local
redis:
image: redis:6.2-alpine
container_name: sadfavbot-redis
environment:
- REDIS_PORT
- REDIS_PASSWORD
- REDISCLI_AUTH=${REDIS_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "redis-cli -p $$REDIS_PORT -a $$REDIS_PASSWORD ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
expose:
- ${REDIS_PORT}
command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD:?error} --port ${REDIS_PORT}
volumes:
- ./data/redis:/data
networks:
- redis-network
logging:
driver: local
networks:
postgres-network:
driver: bridge
redis-network:
driver: bridge