Files
webssh/deployment/docker-compose.yml
T

49 lines
1.3 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
# Configure users: format is username:password,username2:password2
- WEBSSH_USERS=admin:admin
# Max upload size (supports format like "100M" for 100MB or "50M" for 50MB)
- MAX_UPLOAD_SIZE=30M
# Session Recording Configuration
- RECORDING_ENABLED=true
- RECORDING_RETENTION_DAYS=30
# Security hardening
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", "curl", "-f", "http://localhost:8080/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
webssh_data: