services: wxcode: build: . image: wxcode-studio:1.0.0 ports: - "${WXCODE_PORT:-8000}:8000" restart: unless-stopped # JNA maps a helper library from a writable, executable temp dir. A read-only # root filesystem makes /tmp noexec and breaks native generation, so keep the # root writable and restrict privileges instead. tmpfs: - /tmp:size=128m,mode=1777 security_opt: - no-new-privileges:true cap_drop: - ALL pids_limit: 256 mem_limit: 512m healthcheck: test: ["CMD", "python", "-c", "import urllib.request,json,sys; d=json.load(urllib.request.urlopen('http://127.0.0.1:8000/api/health',timeout=8)); sys.exit(0 if d.get('status')=='ok' and d.get('runtime_ready') else 1)"] interval: 30s timeout: 10s start_period: 90s retries: 3