services:

  app:
    image: git.leonmorival.xyz/leon/landing-api:latest
    container_name: landing-api
    restart: unless-stopped

    env_file:
      - .env

    networks:
      - proxy
      - database

    volumes:
      - storage:/app/storage


  postgres:
    image: postgres:16
    container_name: landing-api-postgres
    restart: unless-stopped

    environment:
      POSTGRES_DB: ${DB_DATABASE}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_PASSWORD: ${DB_PASSWORD}

    volumes:
      - postgres-data:/var/lib/postgresql/data

    networks:
      - database


volumes:
  storage:
  postgres-data:


networks:
  proxy:
    external: true

  database:
    driver: bridge
