-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
66 lines (62 loc) · 2.08 KB
/
docker-compose.yaml
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
services:
chemcloud:
build:
context: .
dockerfile: Dockerfile
ports:
- 8000:8000
environment:
# Connect to rabbit and redis over docker network instead of localhost
- bigchem_broker_url=amqp://bigchem-broker
- bigchem_backend_url=redis://bigchem-backend/0
env_file:
- .env
volumes:
- ./chemcloud_server:/code/chemcloud_server
command: uvicorn --host 0.0.0.0 --port 8000 chemcloud_server.main:app --reload
bigchem-worker:
image: mtzgroup/bigchem-worker
container_name: bigchem-worker
depends_on:
- bigchem-broker
- bigchem-backend
environment:
- bigchem_broker_url=amqp://bigchem-broker
- bigchem_backend_url=redis://bigchem-backend/0
- TERACHEM_FE_HOST=terachem-frontend
- TERACHEM_PBS_HOST=terachem
env_file:
- .env
volumes:
- bigchem:/tmp/
restart: on-failure
# Run worker listening to default queue and private_queue
command: celery -A bigchem.tasks worker -Q celery,private_queue --without-heartbeat --without-mingle --without-gossip --loglevel=INFO
bigchem-broker:
image: rabbitmq:3.8-management-alpine
# Must specify hostname since data is stored based on hostname and we don't want a random, docker-assigned
# hostname with each new restart of the service. This would result in any past messages stored by the
# former container in the volume to be unseen by the new container.
# https://hub.docker.com/_/rabbitmq/ under "How to use this image"
hostname: rmq-host1
container_name: bigchem-broker
ports:
# Open rabbit to localhost for dev container access
- 5672:5672
- 15672:15672
bigchem-backend:
image: redis:6-alpine
container_name: bigchem-backend
ports:
# Open redis to localhost for dev container access
- 6379:6379
volumes:
bigchem:
networks:
# This is just a hack so docker works while my VPN is on
# https://stackoverflow.com/questions/45692255/how-make-openvpn-work-with-docker
default:
driver: bridge
ipam:
config:
- subnet: 10.10.2.0/24