name: invio

services:
  backend:
    image: ghcr.io/kittendevv/invio-backend:latest
    env_file:
      - .env
    environment:
      ADMIN_USER: ${ADMIN_USER}
      ADMIN_PASS: ${ADMIN_PASS}
      JWT_SECRET: ${JWT_SECRET}
      DATABASE_PATH: ${DATABASE_PATH:-/app/data/invio.db}
    volumes:
      - invio_data:/app/data
    ports:
      - "${BACKEND_PORT:-3000}:3000"
    restart: unless-stopped

  frontend:
    image: ghcr.io/kittendevv/invio-frontend:latest
    env_file:
      - .env
    environment:
      PORT: ${FRONTEND_PORT_INTERNAL:-8000}
      BACKEND_URL: ${BACKEND_URL:-http://backend:3000}
    depends_on:
      - backend
    ports:
      - "${FRONTEND_PORT:-8000}:${FRONTEND_PORT_INTERNAL:-8000}"
    restart: unless-stopped

volumes:
  invio_data:
    driver: local
