# ============================================ # ServerKit Docker Compose # ============================================ # The backend runs directly on the host (not in Docker) # for full system access. Only the frontend runs in Docker. # # Architecture: # - Host nginx (port 80/443) routes domains to apps # - ServerKit frontend (port 8080) serves the UI # - ServerKit backend (port 5000) provides the API # # Usage: # 1. Copy .env.example to .env and configure # 2. Start backend: sudo systemctl start serverkit # 3. Start frontend: docker compose up -d # 4. Configure host nginx to route your domain # ============================================ services: frontend: build: context: ./frontend dockerfile: Dockerfile container_name: serverkit-frontend ports: # Use 8080 internally - host nginx handles 80/443 and routes by domain - "127.0.0.1:8080:80" extra_hosts: # Allows container to reach the host machine where backend runs - "host.docker.internal:host-gateway" volumes: - ./nginx/ssl:/etc/nginx/ssl:ro networks: - serverkit-network restart: unless-stopped healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost/"] interval: 30s timeout: 10s retries: 3 logging: driver: "json-file" options: max-size: "10m" max-file: "3" networks: serverkit-network: driver: bridge name: serverkit-network