-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdocker-compose-example.yml
36 lines (36 loc) · 1.25 KB
/
docker-compose-example.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
version: '3.8'
services:
# You can remove redis section and all its mentions if using "memory" storage
redis:
image: redis:6-alpine
restart: "unless-stopped"
volumes:
# don't forget to put redis.conf to redis_config directory!
- "/opt/bombsweeper/redis/config:/usr/local/etc/redis"
- "/opt/bombsweeper/redis/data:/data"
command: "redis-server /usr/local/etc/redis/redis.conf"
db:
image: postgres:13-alpine
restart: "unless-stopped"
environment:
POSTGRES_PASSWORD: ${SUPERUSER_PASSWORD}
volumes:
- "/opt/bombsweeper/pg/data:/var/lib/postgresql/data"
- "/opt/bombsweeper/pg/init:/docker-entrypoint-initdb.d"
db_migration:
# You can override this tag using docker-compose.override.yml
image: "groosha/telegram-bombsweeper-bot:latest"
restart: "on-failure"
depends_on:
- db
env_file: .env
command: sh -c "python -m alembic upgrade head"
bot:
image: "groosha/telegram-bombsweeper-bot:latest"
stop_signal: SIGINT
restart: "unless-stopped"
env_file: .env
depends_on:
- db
- db_migration
- redis