mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-11-09 21:43:05 +09:00
Introduces a production-ready Dockerfile, a comprehensive CONTRIBUTING.md, and new documentation files (API, installation, roadmap). Updates .env.example with improved comments and structure, enhances .gitignore, and refines the README with expanded features, requirements, and setup instructions. Roadmap and planning files are reorganized, and obsolete HTML is removed.
103 lines
2.7 KiB
YAML
103 lines
2.7 KiB
YAML
# ============================================
|
|
# ServerKit Docker Compose
|
|
# ============================================
|
|
# Usage:
|
|
# 1. Copy .env.example to .env and configure
|
|
# 2. Run: docker compose up -d
|
|
#
|
|
# For production with SSL:
|
|
# docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
|
|
# ============================================
|
|
|
|
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: serverkit-backend
|
|
environment:
|
|
# Flask Configuration
|
|
- FLASK_ENV=${FLASK_ENV:-production}
|
|
- PORT=5000
|
|
|
|
# Security Keys (REQUIRED - generate with: python -c "import secrets; print(secrets.token_hex(32))")
|
|
- SECRET_KEY=${SECRET_KEY:?SECRET_KEY is required}
|
|
- JWT_SECRET_KEY=${JWT_SECRET_KEY:?JWT_SECRET_KEY is required}
|
|
|
|
# Database
|
|
- DATABASE_URL=${DATABASE_URL:-sqlite:///serverkit.db}
|
|
|
|
# CORS Origins (comma-separated list)
|
|
- CORS_ORIGINS=${CORS_ORIGINS:-http://localhost,http://localhost:80}
|
|
volumes:
|
|
# Application data (database)
|
|
- serverkit-data:/app/instance
|
|
|
|
# ServerKit configuration (notifications, security settings, etc.)
|
|
- serverkit-config:/etc/serverkit
|
|
|
|
# ServerKit logs (using /app/logs to avoid conflict with host /var/log mount)
|
|
- serverkit-logs:/app/logs
|
|
|
|
# Quarantine directory for malware
|
|
- serverkit-quarantine:/var/quarantine
|
|
|
|
# Docker socket (for container management)
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
networks:
|
|
- serverkit-network
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:5000/api/v1/system/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 15s
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
container_name: serverkit-frontend
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
ports:
|
|
- "${PORT:-80}:80"
|
|
- "${SSL_PORT:-443}:443"
|
|
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
|
|
|
|
volumes:
|
|
serverkit-data:
|
|
name: serverkit-data
|
|
serverkit-config:
|
|
name: serverkit-config
|
|
serverkit-logs:
|
|
name: serverkit-logs
|
|
serverkit-quarantine:
|
|
name: serverkit-quarantine
|