services:
  # --- Backend Service ---
  backend:
    build: .
    container_name: canifa_backend
    env_file: .env
    ports:
      - "5005:5000"
    volumes:
      - .:/app
    environment:
      - PORT=5000
    restart: unless-stopped
    deploy:
      resources:
        limits:
          memory: 8g
    networks:
      - backend_network
    logging:
      driver: "json-file"
      options:
        tag: "{{.Name}}"

networks:
  backend_network:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: "10.101.10.0/24"
          gateway: "10.101.10.1"
