version: '3'

services:
  nextjs_application:
    build:
      context: .
      dockerfile: Dockerfile.dev
    container_name: nextjs_application
    volumes:
      - .:/app
      - /app/node_modules
      - /app/.next
  nginx:
    build:
      context: ./nginx
      dockerfile: Dockerfile
    restart: always
    container_name: nginx
    ports:
      - '80:80'
      - '443:443'
    volumes:
      - ./nginx/nginx.conf:/etc/nginx/nginx.conf
    depends_on:
      - nextjs_application
