-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
47 lines (44 loc) · 1.08 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
services:
redis:
image: redis:latest
env_file:
- .env
restart: unless-stopped
ports:
- "6370:6379"
# Set credentials & logging
command: >
sh -c '
mkdir -p /usr/local/etc/redis &&
echo "bind 0.0.0.0" > /usr/local/etc/redis/redis.conf &&
echo "appendonly yes" >> /usr/local/etc/redis/redis.conf &&
echo "user default on >$REDIS_PASSWORD ~* +@all" > /usr/local/etc/redis/users.acl &&
redis-server /usr/local/etc/redis/redis.conf --aclfile /usr/local/etc/redis/users.acl
'
volumes:
- redis_data:/var/lib/redis/data
db:
image: postgres:15-alpine
env_file:
- .env
volumes:
- pg_data:/var/lib/postgresql/data
restart: unless-stopped
ports:
- "5470:5432"
bot:
build:
context: .
dockerfile: docker/bot.Dockerfile
command: /bin/bash -c "alembic upgrade head && python -m app"
env_file:
- .env
restart: unless-stopped
volumes:
- "./app:/opt/app/app"
depends_on:
- db
- redis
volumes:
pg_data:
redis_data: