Last active
November 11, 2019 19:51
-
-
Save m4nu56/a035a75cb1af7b1c8b27a798ba30e5b2 to your computer and use it in GitHub Desktop.
Stack mongo + nodejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.4" | |
services: | |
mongo: | |
container_name: mongo | |
image: mongo:4.0 | |
restart: unless-stopped | |
ports: | |
- 27017:27017 | |
environment: | |
MONGO_INITDB_DATABASE: project | |
MONGO_INITDB_ROOT_USERNAME: root | |
MONGO_INITDB_ROOT_PASSWORD: root | |
TZ: Europe/Paris | |
volumes: | |
- /mnt/docker-volume/project/data:/data/db | |
- /mnt/docker-volume/project/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js | |
networks: | |
- project-network | |
nodejs: | |
container_name: nodejs | |
restart: unless-stopped | |
# on utilise l'image déployée sur notre registry | |
image: registry.domain.com/project:develop | |
working_dir: /usr/src/app | |
ports: | |
- 3000:3000 | |
depends_on: | |
- mongo | |
networks: | |
- project-network | |
networks: | |
project-network: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment