Add database-backed user management and password reset tooling.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
services:
|
|
webssh:
|
|
build:
|
|
context: ..
|
|
dockerfile: deployment/Dockerfile
|
|
container_name: webssh-backend
|
|
restart: unless-stopped
|
|
# WebSSH runs internal services; integrated Caddy will expose port 8080 to the host
|
|
ports:
|
|
- "8080:8080"
|
|
environment:
|
|
- TZ=Europe/Sofia
|
|
- PYTHONUNBUFFERED=1
|
|
- LOG_LEVEL=INFO
|
|
# For a one-time import from a legacy installation, configure user:password pairs:
|
|
# - WEBSSH_USERS=user1:pass1,user2:pass2
|
|
# Max upload size, enforced by both Caddy and the backend (e.g. "30MB", "512KB")
|
|
- MAX_UPLOAD_SIZE=30MB
|
|
# Session Recording Configuration
|
|
- RECORDING_ENABLED=true
|
|
- RECORDING_RETENTION_DAYS=30
|
|
# Security hardening
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
tmpfs:
|
|
- /tmp:noexec,nosuid,size=100m
|
|
# Resource limits
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '1.0'
|
|
memory: 512M
|
|
reservations:
|
|
cpus: '0.25'
|
|
memory: 128M
|
|
volumes:
|
|
- webssh_data:/data
|
|
# Optionally expose code to other services (read-only)
|
|
# - ./:/srv/webssh:ro
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import sys, urllib.request; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8080/', timeout=5).getcode() == 200 else 1)"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
|
|
volumes:
|
|
webssh_data: |