# yaml
version: "3.8"

services:
  chores-test-app-backend: # Test backend service name
    image: git.ryankegel.com:3000/kegel/chores/backend:next # Use latest next tag
    ports:
      - "5004:5000" # Host 5004 -> Container 5000
    environment:
      - FLASK_ENV=development
      - FRONTEND_URL=https://devserver.lan:446 # Add this for test env
      - SECRET_KEY=${SECRET_KEY}
      - REFRESH_TOKEN_EXPIRY_DAYS=${REFRESH_TOKEN_EXPIRY_DAYS}
      - DIGEST_TOKEN_SECRET=${DIGEST_TOKEN_SECRET}
      - VAPID_PUBLIC_KEY=${VAPID_PUBLIC_KEY}
      - VAPID_PRIVATE_KEY=${VAPID_PRIVATE_KEY}
      - SEED_EMAIL=${SEED_EMAIL}
      - SEED_PASSWORD=${SEED_PASSWORD}
      - SEED_PIN=${SEED_PIN}
      - SEED_FIRST_NAME=${SEED_FIRST_NAME}
      - SEED_LAST_NAME=${SEED_LAST_NAME}
    volumes:
      - chores-test-app-backend-data:/app/data

  chores-test-app-frontend: # Test frontend service name
    image: git.ryankegel.com:3000/kegel/chores/frontend:next # Use latest next tag
    ports:
      - "446:443" # Host 446 -> Container 443 (HTTPS)
    environment:
      - BACKEND_HOST=chores-test-app-backend # Points to internal backend service
    depends_on:
      - chores-test-app-backend
    # Add volumes, networks, etc., as needed

networks:
  chores-test-app-net:
    driver: bridge

volumes:
  chores-test-app-backend-data: {}
