forked from cosmicpython/code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
77 lines (72 loc) · 1.58 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
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
version: "3.8"
services:
redis_pubsub:
build:
context: .
dockerfile: Dockerfile
image: allocation-image
depends_on:
- edgedb
- redis
- mailhog
volumes:
- ".env:/.venv"
- "./src:/src"
- "./tests:/tests"
entrypoint:
- python
- /src/allocation/app/redis_eventconsumer.py
api:
image: allocation-image
depends_on:
- redis_pubsub
- mailhog
environment:
- API_HOST=api
- FASTAPI_APP=allocation/entrypoints/run.py
volumes:
- ./src:/src
- ./tests:/tests
- ".env:/.venv"
entrypoint:
- uvicorn
- main:app
- --host=0.0.0.0
- --port=8000
ports:
- "5005:8000"
edgedb:
image: edgedb/edgedb:latest
env_file:
- ./.env
environment:
EDGEDB_SERVER_ADMIN_UI: "enabled"
EDGEDB_SERVER_PASSWORD: "${DB_ROOT_PASSWORD}"
EDGEDB_SERVER_PORT: "${DB_PORT:-5656}"
EDGEDB_SERVER_SECURITY: "insecure_dev_mode"
ports:
- "5656:5656"
volumes:
- "edgedb_data:/var/lib/edgedb/data"
- "./src/allocation/dbschema:/dbschema"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5656/server/status/ready"]
interval: 3s
timeout: 1s
retries: 10
redis:
image: redis:alpine
ports:
- "63791:6379"
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 5s
timeout: 3s
retries: 3
mailhog:
image: mailhog/mailhog
ports:
- "11025:1025"
- "18025:8025"
volumes:
edgedb_data: