-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
144 lines (137 loc) · 3 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
services:
db:
image: postgres:15-alpine
environment:
POSTGRES_DB: valhub
POSTGRES_PASSWORD: valhub
POSTGRES_USER: valhub
ports:
- "5432:5432"
volumes:
- valhub:/data/db
api:
build:
context: ./valhub
dockerfile: Dockerfile
args:
djangosk: ${djangosk}
env_file:
- .env
environment:
PGDATABASE: valhub
PGUSER: valhub
PGHOST: db
PG_DATABASE_URI: "postgresql://valhub:valhub@db/valhub"
DJANGO_SUPERUSER_USERNAME: ${admin_username}
DJANGO_SUPERUSER_PASSWORD: ${admin_password}
DJANGO_SUPERUSER_EMAIL: ${admin_email}
DJANGO_SECRET_KEY: ${djangosk}
ports:
- "8005:8005"
depends_on:
- db
- sqs
volumes:
- type: bind
source: ./valhub
target: /root/valhub
s3:
build:
context: ./s3Emulator
dockerfile: Dockerfile
env_file:
- .env
environment:
HOST: 0.0.0.0
ports:
- "5000:5000"
depends_on:
- api
volumes:
- type: bind
source: ./s3Emulator/pv-validation-hub-bucket
target: /pv-validation-hub-bucket
ec2:
build:
context: ./ec2
dockerfile: Dockerfile
env_file:
- .env
environment:
HOST: 0.0.0.0
ports:
- "7000:7000"
depends_on:
- api
volumes:
- type: bind
source: ./ec2
target: /root/admin
# aws credentials
- type: bind
source: ~/.aws
target: /root/.aws
react-client:
stdin_open: true
build:
context: ./pv-validation-hub-client
dockerfile: Dockerfile
environment:
- NODE_ENV=development
- CHOKIDAR_USEPOLLING=true
- WATCHPACK_POLLING=true
- "HOST=0.0.0.0"
ports:
- "3000:3000"
depends_on:
- api
- s3
develop:
watch:
- action: sync
path: ./pv-validation-hub-client
target: /app
ignore:
- node_modules/
- action: rebuild
path: package.json
sqs:
image: softwaremill/elasticmq:latest
ports:
- "9324:9324"
environment:
- "ELASTICMQ_OPTS=-Dconfig.file=/opt/elasticmq.conf"
volumes:
- ./custom.conf:/opt/elasticmq.conf
- ./application.ini:/opt/docker/conf/application.ini
worker:
build:
context: ./workers
env_file:
- .env
ports:
- "8500:8500"
- "8787:8787"
depends_on:
- api
- s3
- sqs
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./workers/current_evaluation:/root/worker/current_evaluation
- ./workers/logs:/root/worker/logs
- ./workers/tmp:/tmp
- ./workers/requirements.txt:/root/worker/requirements.txt
- ./workers/src:/root/worker/src
# - type: bind
# source: ~/.aws
# target: /root/.aws
restart: unless-stopped
develop:
watch:
- action: sync
path: ./workers/src
target: /root/worker/src
volumes:
valhub:
node_modules: