Add Web 2 workspace and controlled deployment updates

This commit is contained in:
AttilaNet
2026-11-10 16:33:14 +08:00
parent 7fe4c0ffdf
commit dbb31707ea
58 changed files with 11283 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
name: ranch-web
services:
web:
image: ${RANCH_WEB_IMAGE:-ghcr.io/attilanet/myrzx_bot-web:dev}
build:
context: .
args:
WEB_VERSION: ${RANCH_WEB_BUILD_VERSION:-2.0.0.dev1}
user: "10001:10001"
init: true
restart: unless-stopped
stop_grace_period: 120s
environment:
RANCH_WEB_HOST: "0.0.0.0"
RANCH_WEB_PORT: "8765"
RANCH_WEB_DATA_DIR: /data
RANCH_WEB_UPDATER_DIR: /run/ranch-updater
RANCH_WEB_PASSWORD: ${RANCH_WEB_PASSWORD:?Set RANCH_WEB_PASSWORD in the private .env file}
RANCH_WEB_ALLOWED_HOSTS: ${RANCH_WEB_ALLOWED_HOSTS:-localhost,127.0.0.1}
RANCH_WEB_ALLOWED_ORIGINS: ${RANCH_WEB_ALLOWED_ORIGINS:-}
RANCH_WEB_SECURE_COOKIE: ${RANCH_WEB_SECURE_COOKIE:-false}
ports:
- "${RANCH_WEB_BIND:-127.0.0.1}:${RANCH_WEB_PUBLISH_PORT:-8765}:8765"
volumes:
- type: bind
source: ${RANCH_WEB_DATA_DIR:-./local_state/ranch_web}
target: /data
bind:
create_host_path: false
- type: bind
source: ${RANCH_WEB_UPDATER_CONTROL_DIR:-./local_state/ranch_web_updater}
target: /run/ranch-updater
read_only: true
bind:
create_host_path: false
read_only: true
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m,mode=1777
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"