blob: 5be78431cf46098dad5c78124dca63ae8875a68b (
plain) (
blame)
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
|
services:
mongo:
image: mongo:latest
ports:
- "127.0.0.1:27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: forms-backend
MONGO_INITDB_ROOT_PASSWORD: forms-backend
MONGO_INITDB_DATABASE: pydis_forms
snekbox:
image: ghcr.io/python-discord/snekbox:latest
ipc: none
ports:
- "127.0.0.1:8060:8060"
privileged: true
redis:
image: redis:latest
ports:
- "127.0.0.1:6379:6379"
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: backend
POSTGRES_PASSWORD: backend
POSTGRES_USER: backend
healthcheck:
test: ["CMD-SHELL", "pg_isready -U backend"]
interval: 2s
timeout: 1s
retries: 5
ports:
- 5000:5432
backend:
build: .
command: ["poetry run alembic upgrade head && poetry run uvicorn backend:app --reload --host 0.0.0.0 --port 8000"]
ports:
- "127.0.0.1:8000:8000"
depends_on:
mongo:
condition: service_started
snekbox:
condition: service_started
redis:
condition: service_started
postgres:
condition: service_healthy
tty: true
env_file:
- .env
volumes:
- .:/app:ro
environment:
- MONGO_DATABASE_URL=mongodb://forms-backend:forms-backend@mongo:27017
- PSQL_DATABASE_URL=postgresql+psycopg_async://backend:backend@postgres:5432/backend
- SNEKBOX_URL=http://snekbox:8060/eval
- OAUTH2_CLIENT_ID
- OAUTH2_CLIENT_SECRET
- ALLOWED_URL
- DEBUG=true
- PRODUCTION=false
- REDIS_URL=redis://redis:6379
|