Files
ServerKit/docker-compose.yml
T
Juan Denis c1d60f112f Add ServerKit CLI, install script, and deployment improvements
Introduces a comprehensive Bash CLI tool (`serverkit`) for managing ServerKit services, users, and database operations. Adds a quick-install script (`install.sh`) for Ubuntu, a sample environment file (`.env.example`), and a Python CLI backend (`backend/cli.py`) for administrative tasks. Updates Docker Compose for production readiness, enhances deployment documentation, and adds Click to backend requirements. Also updates references to the correct GitHub repository.
2026-01-17 12:13:22 -05:00

62 lines
1.6 KiB
YAML

# ServerKit Docker Compose
# Usage: docker compose up -d
version: '3.8'
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: serverkit-backend
environment:
- FLASK_ENV=${FLASK_ENV:-production}
- DATABASE_URL=${DATABASE_URL:-sqlite:///serverkit.db}
- SECRET_KEY=${SECRET_KEY:?SECRET_KEY is required}
- JWT_SECRET_KEY=${JWT_SECRET_KEY:?JWT_SECRET_KEY is required}
- CORS_ORIGINS=${CORS_ORIGINS:-http://localhost}
volumes:
- serverkit-data:/app/instance
- /var/log:/var/log:ro
- /home:/home:ro
- /opt:/opt:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- serverkit-network
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/api/v1/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
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
networks:
serverkit-network:
driver: bridge
volumes:
serverkit-data:
name: serverkit-data