-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (48 loc) · 1.07 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
version: "3.4"
services:
webapi:
container_name: api-net
build: .
ports:
- 8080:8080
# depends_on:
# - mongo
# - broker
# links:
# - mongo
# - broker
# networks:
# - webapi-mongo
# - webapi-rabbitmq
mongo:
container_name: container-mongodb
image: mongo:latest
restart: always
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
MONGO_INITDB_DATABASE: root-db
volumes:
- ./scripts/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
# networks:
# - webapi-mongo
# expose:
# - 27017
broker:
container_name: rabbitmq
image: rabbitmq:management
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- 5672:5672
- 15672:15672
# networks:
# - webapi-rabbitmq
# expose:
# - 5672
networks:
webapi-mongo:
webapi-rabbitmq: