-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
41 lines (37 loc) · 1.15 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
version: '3.5'
services:
app:
build:
context: .
dockerfile: Dockerfile
working_dir: /app
container_name: general-knowledge-trivia-service
restart: unless-stopped
volumes:
- ./:/app
ports:
- "${APP_PORT:-8080}:8080"
networks:
- general-knowledge-trivia-service-network
mongo:
image: "mongo:5.0"
container_name: mongodb-general-knowledge-trivia
command: mongod --auth
restart: unless-stopped
logging:
driver: none
ports:
- "${DB_PORT_INTERNAL_LOCALHOST_MONGODB:-27017}:${DB_PORT_MONGODB:-27017}"
environment:
- MONGO_INITDB_ROOT_USERNAME=${DB_USERNAME_MONGODB}
- MONGO_INITDB_ROOT_PASSWORD=${DB_PASSWORD_MONGODB}
volumes:
- /home/$USER/general-knowledge-trivia-service/mongo-data:/data/db
- /home/$USER/general-knowledge-trivia-service/mongo-log:/var/log/mongodb/
networks:
- general-knowledge-trivia-service-network
networks:
general-knowledge-trivia-service-network:
external:
name: general-knowledge-trivia-shared-network
# Create external network with 'docker network create general-knowledge-trivia-shared-network' command