forked from gbeletti/service-golang
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (35 loc) · 853 Bytes
/
docker-compose.yml
File metadata and controls
37 lines (35 loc) · 853 Bytes
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
version: '3'
services:
service:
hostname: service
image: service:latest
build:
context: .
dockerfile: Dockerfile
restart: always
ports:
- "8000:8000"
depends_on:
- rabbitmq
- mongodb
environment:
- RABBITMQ_URI=amqp://guest:guest@rabbitmq:5672?heartbeat=30&connection_timeout=120
- MONGO_URI=mongodb://root:root@mongodb:27017
rabbitmq:
image: 'rabbitmq:3-management-alpine'
ports:
- '15672:15672'
- '5672:5672'
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
mongodb:
image: mongo:latest
ports:
- '27017:27017'
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=root
- MONGO_INITDB_DATABASE=data
volumes:
- ./db:/docker-entrypoint-initdb.d:ro