-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
57 lines (53 loc) · 1.35 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
version: "3"
volumes:
db_data:
api_poetry_venv:
ui_node_modules:
services:
db:
image: postgres:14-alpine
# Log all queries
# command: postgres -c log_statement=all
environment:
- POSTGRES_DB=beta_spray
- POSTGRES_USER=beta_spray
- POSTGRES_PASSWORD=beta_spray
ports:
- 5432:5432
volumes:
# The postgres image already creates a volume for this directory, but by
# overriding it we can give it a friendly name
- db_data:/var/lib/postgresql/data
api:
build: ./api/
command: ./scripts/cmd_dev.sh
init: true # Fixes slow shutdown
tty: true # Colors!
environment:
- DJANGO_SETTINGS_MODULE=beta_spray.settings.settings_dev
- BETA_SPRAY_DB_HOST=db
- BETA_SPRAY_GOOGLE_CLIENT_ID
- BETA_SPRAY_GOOGLE_CLIENT_SECRET
depends_on:
- db
ports:
- "8000:8000"
- "8001:8001" # debugpy
volumes:
- ./api:/app
- api_poetry_venv:/app/.venv
ui:
build: ./ui/
command: ./scripts/cmd.sh
init: true # Fixes slow shutdown
depends_on:
- api # Need api to generate schema first
environment:
WEBPACK_HOST: 0.0.0.0
BETA_SPRAY_API_HOST: http://api:8000
ports:
- "3000:3000"
volumes:
- ./ui:/app
- ./api/src/schema.graphql:/app/schema.graphql
- ui_node_modules:/app/node_modules