-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
47 lines (44 loc) · 1.16 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:
warehouse:
image: postgres:14
restart: always
environment:
POSTGRES_USER: warehouse_user
POSTGRES_PASSWORD: warehouse_password
POSTGRES_DB: warehouse
ports:
- "7654:5432"
volumes:
- warehouse_data:/var/lib/postgresql/data
matchbox-postgres:
image: postgres:14
restart: always
environment:
POSTGRES_USER: matchbox_user
POSTGRES_PASSWORD: matchbox_password
POSTGRES_DB: matchbox
ports:
- "5432:5432"
volumes:
- matchbox_data:/var/lib/postgresql/data
api:
build:
context: .
dockerfile: src/matchbox/server/Dockerfile
ports:
- "8000:8000"
depends_on:
- matchbox-postgres
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/server
target: /code/src/matchbox/server
# Rebuild the image on changes to the `pyproject.toml`
- action: rebuild
path: ./pyproject.toml
volumes:
warehouse_data:
matchbox_data: