-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
87 lines (86 loc) · 2.39 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
78
79
80
81
82
83
84
85
86
87
# version: "3.8" # version is now obsolete
services:
# ---------------------------------
# Redis: used for async celery tasks
# ---------------------------------
redis:
image: redis
command: redis-server --requirepass password
expose:
- 6379
# ---------------------------------
# Postgres Database
# ---------------------------------
db:
image: postgres
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- DB_HOST=localhost
ports:
- "5432:5432"
# ---------------------------------
# Client side (Vue.js)
# - Built from "client/Dockerfile"
# ---------------------------------
# TODO: Load data every time
client:
build: "./client"
environment:
- DEV_MODE=true
command: ./run_client.sh
volumes:
- .:/code
- /code/client/node_modules
ports:
- "8080:8080"
depends_on:
- db
# ---------------------------------
# Server side (Django)
# - Built from "server/Dockerfile"
# ---------------------------------
server:
# OpenDP requires a linux/amd64 platform, which may not be the default on some systems
platform: linux/amd64
build: "./server"
# For production we will need to set
# these variables to point to a standalone instance
environment:
- DJANGO_SETTINGS_MODULE=opendp_project.settings.development
- VUE_APP_GOOGLE_CLIENT_ID="TEST. Set in docker-compose.yml"
- VUE_APP_ADOBE_PDF_CLIENT_ID="TEST. Set in docker-compose.yml"
env_file:
- .env
command: sh -c "python manage.py show_debug_params && python manage.py runserver 0.0.0.0:8000"
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
- client
- db
# ---------------------------------
# Celery Task Queue
# - Used for profiling, other longer
# running tasks
# ---------------------------------
celery-queue:
build: "./server"
# OpenDP requires a linux/amd64 platform, which may not be the default on some systems
platform: linux/amd64
environment:
- DJANGO_SETTINGS_MODULE=opendp_project.settings.development
env_file:
- .env
command: celery -A opendp_project worker -l info -n worker_dpcreator
# command: celery -A opendp_project worker -l INFO
volumes:
- .:/code
ports:
- "8070:8070"
depends_on:
- db
- redis
- server