-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
78 lines (71 loc) · 2.31 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
version: '3.9'
services:
node-mongo:
image: ghcr.io/thenewboston-developers/node-mongo:latest
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
env_file: .env
ports:
- 127.0.0.1:27017:27017
volumes:
- node-mongo-db:/data/db
- node-mongo-configdb:/data/configdb
- node-mongo-key:/etc/mongo-key
mongo-express:
image: mongo-express
restart: always
ports:
# Because this container will be used for production we do not expose port on
# public interface (use `ssh` proxying for secure access to Mongo Admin if you need it
# in production)
- 127.0.0.1:8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: root
ME_CONFIG_MONGODB_URL: mongodb://root:${MONGO_INITDB_ROOT_PASSWORD}@node-mongo:27017/
depends_on:
- node-mongo
celery-broker:
# We need explicit hostname to avoid bloating of the RabbitMQ volume
hostname: celery-broker
image: rabbitmq:3.9.13-management-alpine
restart: always
ports:
# Because this container will be used for production we do not expose port on
# public interface (use `ssh` proxying for secure access to RabbmitMQ management)
- 127.0.0.1:5672:5672
- 127.0.0.1:15672:15672
# TODO(dmu) LOW: Make `celery` service DRY with `node` service
celery:
image: ghcr.io/thenewboston-developers/node:latest
environment:
TNB_DATABASES: '{"default":{"CLIENT":{"host":"node-mongo","password":"${MONGO_INITDB_ROOT_PASSWORD}"}}}'
TNB_CELERY_BROKER_URL: 'amqp://guest:guest@celery-broker:5672//'
env_file: .env
command: poetry run celery -A node.config.celery worker --loglevel=INFO
depends_on:
- node-mongo
- celery-broker
node:
image: ghcr.io/thenewboston-developers/node:latest
command: ./run.sh
environment:
TNB_DATABASES: '{"default":{"CLIENT":{"host":"node-mongo","password":"${MONGO_INITDB_ROOT_PASSWORD}"}}}'
env_file: .env
depends_on:
- node-mongo
- celery-broker
node-reverse-proxy:
image: ghcr.io/thenewboston-developers/node-reverse-proxy:latest
ports:
- 8555:8555
depends_on:
- node
volumes:
node-mongo-db:
driver: local
node-mongo-configdb:
driver: local
node-mongo-key:
driver: local