Skip to content

Instantly share code, notes, and snippets.

@m4nu56

m4nu56/docker-compose.yml

Last active Nov 11, 2019
Embed
What would you like to do?
Stack mongo + nodejs
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
You can’t perform that action at this time.