# Builds a minimal debian image that, on every container start, pulls the # hbbs/hbbr/utils .deb from a Gitea Actions artifact and installs it before # launching the binary. Both services share the same image; only the command # differs. # # The .deb is fetched at runtime (not build time), so `docker compose up` # always picks up the newest successful run on $GITEA_BRANCH. To pin a # specific zip and skip auto-discovery, set ARTIFACT_URL in your shell or # .env, e.g.: # ARTIFACT_URL=https://gitea.cstudio.ch/mike/rustdesk-server/actions/runs/173/artifacts/rustdesk-server-linux-amd64-1e961cdd929f7af97148b76d9de79998a89402a3 \ # docker compose up -d # networks: rustdesk-net: external: false # The image only needs to bundle curl/jq/unzip/tini/dpkg + the fetch scripts — # no build args required. The actual .deb download happens at container start # (see docker/entrypoint.sh), driven by the env vars in x-rustdesk-env below. x-rustdesk-build: &rustdesk-build context: ./docker dockerfile: Dockerfile.deb # Runtime env. Two groups: # 1) Artifact-fetch config consumed by entrypoint.sh on every container # start — set ARTIFACT_URL to pin a specific zip, otherwise the script # picks the newest successful run on $GITEA_BRANCH. # 2) hbbs/hbbr knobs. Most settings (relay, bootstrap admin, key, http # port) are passed via CLI flags below — the binary's env-var # convention transforms `--foo-bar` into `FOO-BAR` (literal dashes, # uppercase), which is awkward in YAML, so flags are clearer. x-rustdesk-env: &rustdesk-env GITEA_URL: "${GITEA_URL:-https://gitea.cstudio.ch}" GITEA_OWNER: "${GITEA_OWNER:-mike}" GITEA_REPO: "${GITEA_REPO:-rustdesk-server}" GITEA_BRANCH: "${GITEA_BRANCH:-pro-features}" ARTIFACT_URL: "${ARTIFACT_URL:-}" RUST_LOG: "${RUST_LOG:-info}" # Force relay for all sessions even on LAN. Uncomment to enable. # ALWAYS_USE_RELAY: "Y" # Override DB path. Default: ./db_v2.sqlite3 in WORKDIR # (= /var/lib/rustdesk-server/db_v2.sqlite3 in this image). # DB_URL: "/var/lib/rustdesk-server/db_v2.sqlite3" services: hbbs: container_name: hbbs build: *rustdesk-build image: rustdesk-server-cst:latest platform: linux/amd64 command: - hbbs - --bootstrap-admin-username=${RUSTDESK_BOOTSTRAP_ADMIN_USERNAME:-admin} - --bootstrap-admin-password=${RUSTDESK_BOOTSTRAP_ADMIN_PASSWORD:-changeme} # - --key=- # "-" auto-generates a key; "_" forces encrypted-only with no explicit key # - --http-port=21114 # admin HTTP API/UI port; 0 disables # When the admin UI shows a device's unattended password. # logged-out (default) = only when nobody is logged in; always = also while a user is logged in. - --unattended-pwd-visibility=${RUSTDESK_UNATTENDED_PWD_VISIBILITY:-logged-out} environment: *rustdesk-env ports: - 21114:21114 - 21115:21115 - 21116:21116 - 21116:21116/udp - 21118:21118 volumes: - ./data:/var/lib/rustdesk-server networks: - rustdesk-net depends_on: - hbbr restart: unless-stopped hbbr: container_name: hbbr # Same build + image tag as hbbs — compose builds once and both reuse it. build: *rustdesk-build image: rustdesk-server-cst:latest platform: linux/amd64 command: - hbbr # - --key=- # match the key set on hbbs (if any) environment: *rustdesk-env ports: - 21117:21117 - 21119:21119 volumes: - ./data:/var/lib/rustdesk-server networks: - rustdesk-net restart: unless-stopped