Copy
services:
app:
image: ghcr.io/linuxserver/kasm:1.19.0@sha256:3f5034941eafe785a02f8a3b4e81b7ec57d8e15f49eea6a7c952a382871a75d4
privileged: true
environment:
- PUID=1000
- PGID=1000
- KASM_PORT=444
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=all
- TZ=${TZ:-Australia/Melbourne}
runtime: nvidia
volumes:
- opt:/opt
- profiles:/profiles #persistent storage
- /dev/input:/dev/input #input support
- /run/udev/data:/run/udev/data #input support
- thumbnails:/kasm_release/www/img/thumbnails
#- /opt/kasm/current/log/agent_json.log:/opt/kasm/current/log/agent_json.log ##CrowdSec logs
ports:
- ${PORT_SETUP:-3000}:3000 #Setup WebGUI
- ${PORT:-444}:444
restart: unless-stopped
# Healthy = inner dockerd answers and the core Kasm services are running and not unhealthy.
# Upgrades: run `docker exec <container> touch /tmp/.kasm-upgrading` first; the flag is ignored after 90 min
# and disappears when the container is recreated.
healthcheck:
test:
- CMD-SHELL
- |
f=/tmp/.kasm-upgrading
[ -e $$f ] && [ -z "$$(find $$f -mmin +90)" ] && exit 0
timeout 10 docker info >/dev/null 2>&1 || exit 1
for c in kasm_db kasm_api kasm_manager kasm_agent kasm_proxy; do
set -- $$(docker inspect -f '{{.State.Status}} {{if .State.Health}}{{.State.Health.Status}}{{end}}' $$c 2>/dev/null)
[ "$$1" = running ] && [ "$$2" != unhealthy ] || exit 1
done
interval: 30s
retries: 3
start_period: 5m
timeout: 20s
labels:
- autoheal=true
- dfgeneric.enable=${CFTUNNEL:-true}
- dfgeneric.0.hostname=${CFSUBDOMAIN}${CFDOMAIN}
- dfgeneric.0.service=https://${HOSTNAME:-localhost}:${PORT:-444}
- dfgeneric.0.access.policy=${CFPOLICY:-authenticate}
- dfgeneric.0.access.name=${CFACCESSNAME:-Kasm}
- dfgeneric.0.access.session_duration=${CFDURATION:-4h}
- dfgeneric.0.zonename=${CFDOMAIN}
- dfgeneric.0.no_tls_verify=true
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
opt:
profiles:
thumbnails: