-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yaml
79 lines (70 loc) · 1.58 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
x-restart-policy: &restart_policy
restart: unless-stopped
services:
postgres:
<< : *restart_policy
image: postgres:13-alpine
ports:
- "127.0.0.1:5432:5432"
environment:
POSTGRES_DB: monty
POSTGRES_PASSWORD: monty
POSTGRES_USER: monty
healthcheck:
test: ["CMD-SHELL", "pg_isready -U monty -d monty"]
interval: 1s
timeout: 1s
retries: 10
redis:
<< : *restart_policy
image: redis:latest
ports:
- "127.0.0.1:6379:6379"
command:
--save 60 1
volumes:
- redis:/data
healthcheck:
test: ["CMD-SHELL", "[ $$(redis-cli ping) = 'PONG' ]"]
interval: 1s
timeout: 1s
retries: 5
snekbox:
<< : *restart_policy
image: ghcr.io/onerandomusername/snekbox:latest
hostname: snekbox
privileged: true
ports:
- "127.0.0.1:8060:8060"
init: true
ipc: none
environment:
PYTHONDONTWRITEBYTECODE: 1
volumes:
- user-base:/snekbox/user_base
monty:
<< : *restart_policy
container_name: monty-python
image: ghcr.io/onerandomusername/monty-python:latest
build:
context: .
dockerfile: Dockerfile
tty: true
depends_on:
postgres:
condition: service_healthy
restart: true
redis:
condition: service_healthy
environment:
- REDIS_URI=redis://redis:6379
- DB_BIND=postgresql+asyncpg://monty:monty@postgres:5432/monty
- USE_FAKEREDIS=false
- SNEKBOX_URL=http://snekbox:8060/
env_file:
- .env
volumes:
- .:/bot
volumes:
user-base:
redis: