-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
49 lines (49 loc) · 1.3 KB
/
docker-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
41
42
43
44
45
46
47
48
49
version: '3.8'
services:
redis:
image: redis:6.0-alpine
restart: "unless-stopped"
environment:
- REDIS_HOST
- VOLUMES_DIR
volumes:
- "~/${VOLUMES_DIR}/redis-config:/usr/local/etc/redis"
- "~/${VOLUMES_DIR}/redis-data:/data"
command: "redis-server /usr/local/etc/redis/redis.conf"
ports:
- "5554:6379"
db:
image: postgres:13-alpine
restart: "unless-stopped"
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASS}
POSTGRES_DB: ${DB_NAME}
VOLUMES_DIR: ${VOLUMES_DIR}
volumes:
- "~/${VOLUMES_DIR}/pg-data:/var/lib/postgresql/data"
ports:
- "5555:5432"
db_migration:
build: .
restart: "on-failure"
depends_on:
- db
environment:
- DB_HOST
- DB_PORT
- DB_NAME
- DB_USER
- DB_PASS
command: sh -c "python -m alembic upgrade head"
bot:
build: .
stop_signal: SIGINT
restart: "unless-stopped"
env_file: .env
depends_on:
- db
- db_migration
- redis
logging:
driver: journald