version: '3.8'

services:
  app:
    build: .
    image: my-weekly-todo:latest
    ports:
      - "13000:3000"
    env_file:
      - .env.docker
    depends_on:
      - db
    volumes:
      - ./logs:/app/logs
    restart: unless-stopped

  db:
    image: postgres:15
    env_file:
      - .env.docker
    volumes:
      - postgres_data:/var/lib/postgresql/data
    ports:
      - "15432:5432"
    restart: unless-stopped

volumes:
  postgres_data:
  app_logs:
