forked from ReliefApplications/ems-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dist.yml
70 lines (67 loc) · 1.68 KB
/
docker-compose.dist.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
version: '3.7'
services:
api:
container_name: ems-ui-poc-api
restart: always
env_file:
- .env
build: # If local
context: .
dockerfile: Dockerfile
target: base # If local
# target: production # If production test
ports:
- '3000:3000'
- '9229:9229'
expose:
- '3000'
- '9229'
volumes:
- ./config:/home/node/app/config # If local
- ./src:/home/node/app/src # If local
- .docker/api/logs:/home/node/app/logs # If local
- ./.migrate:/home/node/app/.migrate
depends_on:
- rabbitmq
#- mongodb # If mongo docker
links:
- rabbitmq
#- mongodb # If mongo docker
command: npm run dev
# command: npm run start # If prod
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
env_file:
- .env
volumes:
- 'rabbitmq_data:/data'
- ./.docker/rabbitmq/etc/:/etc/rabbitmq/
- ./.docker/rabbitmq/data/:/var/lib/rabbitmq/
- ./.docker/rabbitmq/logs/:/var/log/rabbitmq/
- ./rabbitmq/enabled_plugins:/etc/rabbitmq/enabled_plugins
ports:
- '5672:5672'
- '15672:15672'
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 3
# mongodb: # If mongo docker
# image: mongo:5.0
# restart: unless-stopped
# env_file:
# - .env
# environment:
# - MONGO_INITDB_ROOT_USERNAME=$DB_USER
# - MONGO_INITDB_ROOT_PASSWORD=$DB_PASS
# ports:
# - $DB_PORT:$DB_PORT
# volumes:
# - mongodb:/data/db
# command: mongod --quiet --logpath /dev/null
volumes:
rabbitmq_data:
# mongodb: # If mongo docker
# driver: local