-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
109 lines (102 loc) · 2.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
109 lines (102 loc) · 2.2 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
109
services:
redis:
image: redis
command: redis-server
expose:
- 6379
db:
image: postgres:18
restart: always
volumes:
- postgres_data:/var/lib/postgresql
environment:
- POSTGRES_PASSWORD=reopt
- POSTGRES_DB=reopt
expose:
- 5432
celery:
build:
context: .
dockerfile: Dockerfile
image: base-api-image:latest
command: >
"celery -A reopt_api worker -l info"
environment:
- APP_ENV=local
- DB_HOST=db
- DB_NAME=reopt
- DB_USERNAME=postgres
- DB_PASSWORD=reopt
- REDIS_HOST=redis
- REDIS_PASSWORD=
- NLR_API_KEY
env_file:
- path: .env
required: false
volumes:
- .:/opt/reopt
depends_on:
- db
- redis
- julia
django:
image: base-api-image:latest
command: >
"python manage.py migrate
&& /opt/reopt/bin/wait-for-it.bash -t 0 julia:8081 -- python manage.py runserver 0.0.0.0:8000"
environment:
- APP_ENV=local
- DB_HOST=db
- DB_NAME=reopt
- DB_USERNAME=postgres
- DB_PASSWORD=reopt
- REDIS_HOST=redis
- REDIS_PASSWORD=
- NLR_API_KEY
env_file:
- path: .env
required: false
depends_on:
- db
- redis
- julia
- celery
ports:
- 8000:8000
volumes:
- .:/opt/reopt
julia:
container_name: julia_api
build:
context: julia_src/
dockerfile: Dockerfile
environment:
- XPRESS_JL_SKIP_LIB_CHECK=True
- XPRESS_INSTALLED=False
# command: julia --project=/opt/julia_src http.jl
command: julia --project=. -e 'using Pkg; Pkg.instantiate(); include("http.jl")'
ports:
- "8081:8081"
volumes:
- ./julia_src:/opt/julia_src
db-syncer:
profiles:
- db-syncer
build:
context: .
dockerfile: db-syncer/Dockerfile
args:
BUNDLE_FROZEN: "false"
volumes:
- .:/app
- ~/.vault-token:/root/.vault-token:ro
depends_on:
- db
environment:
- LOAD_VAULT_ENV_SECRETS=true
- DEV_DB_HOST=db
- DEV_DB_NAME=reopt
- DEV_DB_USERNAME=postgres
- DEV_DB_PASSWORD=reopt
volumes:
postgres_data: