generated from moevm/nsql-clean-tempate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
54 lines (49 loc) · 1.08 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
52
53
54
services:
backend:
container_name: anime-backend
image: ${DOCKER_REGISTRY-}backend
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_HTTP_PORTS=8080
build:
context: .
dockerfile: backend/Dockerfile
ports:
- "127.0.0.1:5000:8080"
depends_on:
- database
networks:
- backend-net
- frontend-net
frontend:
container_name: anime-frontend
image: ${DOCKER_REGISTRY-}frontend
restart: on-failure
ports:
- "8000:80"
build:
context: .
dockerfile: frontend/Dockerfile
networks:
- frontend-net
database:
container_name: anime-database
image: mongo:7.0.7
hostname: mongodb
environment:
- MONGO_HOST=mongodb
- MONGO_PORT=27017
- MONGO_INITDB_ROOT_USERNAME=username
- MONGO_INITDB_DATABASE=anime_db
- MONGO_INITDB_ROOT_PASSWORD=password
restart: always
volumes:
- mongodb-data:/data/db
command: mongod --quiet
networks:
- backend-net
volumes:
mongodb-data:
networks:
backend-net:
frontend-net: