version: '3.8'

services:
  api:
    build: .
    container_name: nest_app
    restart: always
    ports:
      - "3000:3000"
    env_file:
      - .env
    depends_on:
      - mongo

  mongo:
    image: mongo:7
    container_name: mongo_db
    restart: always
    ports:
      - "27017:27017"
    volumes:
      - mongo_data:/data/db

volumes:
  mongo_data:
