Files
ServerKit/docker-compose.yml
T
Juan DenisandClaude Opus 4.5 eebb37fd5b Add multi-site support with host nginx reverse proxy
- Host nginx routes domains to different apps
- ServerKit frontend moved to port 8080 (internal)
- New CLI commands: setup-proxy, add-site, list-sites, remove-site
- Site config templates for easy domain setup
- Install script now sets up nginx proxy automatically

Usage:
  sudo serverkit add-site test.example.com 3000
  sudo serverkit list-sites
  sudo serverkit remove-site test.example.com

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:04:26 -05:00

51 lines
1.5 KiB
YAML

# ============================================
# 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