Moxitech-Websocket-Do/docker-compose.yaml

56 lines
969 B
YAML
Raw Permalink Normal View History

2024-09-01 02:36:40 +07:00
services:
api:
container_name: mnote-api-application
build:
context: ./server
dockerfile: Dockerfile
env_file: ".env"
ports:
- "8099:8099"
depends_on:
- mongo
networks:
- notes_network
restart: always
nginx:
image: nginx:alpine
container_name: mnotes-nginx-service
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
networks:
- notes_network
depends_on:
- api
mongo:
image: mongo
container_name: mnotes-db
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_INITDB_DATABASE}
ports:
- '27017:27017'
networks:
- notes_network
volumes:
- mongodata:/data/db
restart: always
networks:
notes_network:
driver: bridge
volumes:
mongodata:
driver: local