-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
50 lines (47 loc) · 1000 Bytes
/
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
version: '3.8'
services:
mongo:
image: mongo
env_file: .env
environment:
- MONGO_INITDB_ROOT_USERNAME=$MONGO_USERNAME
- MONGO_INITDB_ROOT_PASSWORD=$MONGO_PASSWORD
ports:
- $MONGO_PORT:$MONGO_PORT
volumes:
- ./mongo_data:/data/db
rabbitmq:
container_name: "rabbitmq"
image: rabbitmq:3.8-management-alpine
environment:
- RABBITMQ_DEFAULT_USER=myuser
- RABBITMQ_DEFAULT_PASS=mypassword
ports:
# AMQP protocol port
- '5672:5672'
# HTTP management UI
- '15672:15672'
api:
container_name: url-shortener
build:
context: ./
dockerfile: ./Dockerfile
image: url-shortener
env_file: .env
depends_on:
- mongo
- rabbitmq
ports:
- 80:$PORT
environment:
NODE_ENV: production
MONGO_HOST: mongo
RABBIT_HOST: rabbitmq
links:
- mongo
- rabbitmq
volumes:
- ./:/dist
volumes:
mongo:
driver: local