You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
454 B

10 months ago
3 years ago
10 months ago
3 years ago
10 months ago
  1. version: '3'
  2. services:
  3. node:
  4. container_name: nodejs-api
  5. build:
  6. context: .
  7. dockerfile: Dockerfile
  8. ports:
  9. - "3000:3000"
  10. environment:
  11. - NODE_ENV=production
  12. volumes:
  13. - .:/app
  14. depends_on:
  15. - mongo
  16. restart: always
  17. mongo:
  18. container_name: mongodb
  19. image: mongo:latest
  20. ports:
  21. - "27017:27017"
  22. volumes:
  23. - mongo_data:/data/db
  24. restart: always
  25. volumes:
  26. mongo_data: