Advertisement
nodejsdeveloperskh

node.js + mongodb

Jun 3rd, 2021
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.89 KB | None | 0 0
  1. version: "3.7"
  2.  
  3. services:
  4.   web-app:
  5.     image: $APP_NAME:latest
  6.     build:
  7.       context: .
  8.       dockerfile: ./dev.Dockerfile
  9.     ports:
  10.       - $APP_EXPOSED_PORT:$APP_PORT
  11.     hostname: web-app
  12.     restart: always
  13.     container_name: ${APP_NAME}
  14.     env_file:
  15.       - ./.env
  16.       - ./.env.mongo
  17.     volumes:
  18.       - type: bind
  19.         target: /usr/src/app
  20.         source: .
  21.         volume:
  22.           nocopy: true
  23.     networks:
  24.       - rabi-network
  25.     environment:
  26.       - MONGODB_HOST=mongo
  27.  
  28.   mongo:
  29.     image: bitnami/mongodb:4.4-debian-10
  30.     container_name: rabi-database
  31.     hostname: mongo
  32.     restart: always
  33.     env_file:
  34.       - ./.env.mongo
  35.     ports:
  36.       - 27018:27017
  37.     volumes:
  38.       - ticketing-mongo-volume:/bitnami/mongodb
  39.     networks:
  40.       - rabi-network
  41.  
  42. volumes:
  43.   ticketing-mongo-volume:
  44.  
  45. networks:
  46.   rabi-network:
  47.     driver: bridge
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement