-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
108 lines (105 loc) · 2.73 KB
/
docker-compose.yml
File metadata and controls
108 lines (105 loc) · 2.73 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
services:
warehouse:
image: postgres:17
restart: always
ports:
- "${MB__DEV__WAREHOUSE_PORT}:5432"
volumes:
- warehouse_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=warehouse_user
- POSTGRES_PASSWORD=warehouse_password
- POSTGRES_DB=warehouse
filestorage:
image: minio/minio:latest
restart: always
volumes:
- matchbox_store:/data
command: server --console-address ":9001" /data
ports:
- "${MB__DEV__DATASTORE_PORT}:9000"
- "${MB__DEV__DATASTORE_CONSOLE_PORT}:9001"
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 5
environment:
MINIO_ROOT_USER: ${MB__SERVER__DATASTORE__ACCESS_KEY_ID}
MINIO_ROOT_PASSWORD: ${MB__SERVER__DATASTORE__SECRET_ACCESS_KEY}
api:
build:
context: .
args:
MB_VERSION: ${MB_VERSION-0.0.0dev0}
dockerfile: src/matchbox/server/Dockerfile
target: dev
ports:
- "${MB__DEV__API_PORT}:8000"
command: fastapi dev --host 0.0.0.0 src/matchbox/server/api
depends_on:
- postgres
- warehouse
- filestorage
- redis
- worker
develop:
# https://docs.docker.com/compose/file-watch/#compose-watch-versus-bind-mounts
watch:
# Sync the working directory with the `/app` directory in the container
- action: sync
path: ./src/matchbox
target: /code/src/matchbox
# Rebuild the image on changes to the `pyproject.toml`
- action: rebuild
path: ./pyproject.toml
postgres:
image: postgres:17
restart: always
ports:
- "${MB__DEV__POSTGRES_BACKEND_PORT}:5432"
volumes:
- matchbox_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=matchbox
- POSTGRES_PASSWORD=matchbox_password
- POSTGRES_USER=matchbox_user
# command:
# - "postgres"
# - "-c"
# - "log_statement=all"
# - "-c"
# - "log_connections=on"
# - "-c"
# - "log_disconnections=on"
# - "-c"
# - "log_duration=on"
redis:
image: redis:8
restart: always
ports:
- "${MB__DEV__REDIS_PORT}:6379"
worker:
build:
context: .
dockerfile: src/matchbox/server/Dockerfile
target: dev
args:
MB_VERSION: ${MB_VERSION-0.0.0dev0}
command: celery -A matchbox.server.uploads.celery worker --loglevel=info
depends_on:
- postgres
- filestorage
- redis
flower:
image: mher/flower
container_name: flower
ports:
- "${MB__DEV__FLOWER_PORT}:5555"
command: celery --broker=${MB__SERVER__REDIS_URI} flower
depends_on:
- redis
volumes:
warehouse_data:
matchbox_data:
matchbox_store: