forked from MasterGroosha/telegram-feedback-bot-topics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
40 lines (37 loc) · 980 Bytes
/
compose.yml
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
services:
postgres:
image: postgres:15-alpine
restart: "always"
environment:
# Superuser username/password
POSTGRES_USER: superuser
POSTGRES_PASSWORD: superpassword
healthcheck:
test: [ "CMD", "sh", "-c", "pg_isready -U $$POSTGRES_USER -h $$(hostname -i)" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./postgres-data:/var/lib/postgresql/data
- ./postgres-firstrun/init-user-db.sh:/docker-entrypoint-initdb.d/init-user-db.sh:ro
redis:
image: redis:7
volumes:
- ./redis-data:/data
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 30s
retries: 50
restart: "always"
command: 'redis-server --save 60 1 --loglevel warning'
tg_bot:
build:
context: .
dockerfile: Dockerfile
restart: "always"
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy