diff --git a/docker-compose.yaml b/docker-compose.yaml index 227cbce..497736c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -192,25 +192,6 @@ services: - proxy - interstack - droparea: - image: linuxserver/openssh-server - container_name: droparea - environment: - PUID: 1 - PGID: 1 - TZ: Europe/Budapest - SUDO_ACCESS: "false" - PASSWORD_ACCESS: "true" - USER_NAME: drop - USER_PASSWORD: ${DROP_PASSWORD} - volumes: - - ./data/softwares:/home/drop - ports: - - "${DROPAREA_SSH_PORT}:2222" - networks: - - proxy - - interstack - volumes: gitea: woodpecker: diff --git a/env-example b/env-example index d7167c3..b7d85aa 100644 --- a/env-example +++ b/env-example @@ -13,7 +13,6 @@ PHPMYADMIN_DOMAIN=db.teletype.hu # Ports GITEA_SSH_PORT=2222 -DROPAREA_SSH_PORT=2223 TRAEFIK_WEB_PORT=9100 TRAEFIK_API_PORT=9101 @@ -23,7 +22,6 @@ WOODPECKER_AGENT_SECRET= MYSQL_ROOT_PASSWORD= DB_PASSWORD= UPDATE_SECRET= -DROP_PASSWORD= WEBAPP_WIKIJS_TOKEN= DISCORD_INVITE_LINK= diff --git a/libs/ruby/warp_engine/README.md b/libs/ruby/warp_engine/README.md index 228bf05..51cce57 100644 --- a/libs/ruby/warp_engine/README.md +++ b/libs/ruby/warp_engine/README.md @@ -12,9 +12,9 @@ Repository: `https://git.teletypegames.org/tools/warp_engine` - **Catalog domain**: `Software`, `Release`, `ReleaseAsset`, `ExternalLink`, `PlatformLink`, `Image`, `SoftwareImage`, `Download` models with soft-delete semantics and download statistics. -- **CI-callable updater**: your build pipeline drops artifacts into a - directory and calls one endpoint — WarpEngine extracts archives, parses - metadata and upserts the catalog records. Supported platforms out of the +- **CI-callable updater**: your build pipeline uploads artifacts over HTTP + and calls one endpoint — WarpEngine extracts archives, parses metadata + and upserts the catalog records. Supported platforms out of the box: TIC-80, Ebitengine, LÖVE, C64, Godot, Bevy, Phaser. Authenticated by a shared secret or by per-owner database tokens with expiry and scopes (`ApplicationToken`, managed in the admin). @@ -36,19 +36,18 @@ Repository: `https://git.teletypegames.org/tools/warp_engine` ## Example stack (docker compose) `examples/compose` boots everything the engine's workflow assumes, end to -end: the catalog app itself, the SSH drop area the updater contract feeds -from and — behind a compose profile — a Gitea forge with Woodpecker CI, so -you can watch a pipeline publish a release into the catalog. +end: the catalog app itself and — behind a compose profile — a Gitea forge +with Woodpecker CI, so you can watch a pipeline publish a release into the +catalog. | Service | Role | Where | | --- | --- | --- | | `app` | Minimal Rails host with the engine mounted as a path gem (headless: API + updater) | `http://localhost:8080` | | `mysql` | Catalog database | internal | -| `droparea` | SSH server where pipelines drop build artifacts; shares the `softwares` volume with `app` | `ssh drop@localhost -p 2222` | | `gitea` | Git forge (profile `ci`) | `http://gitea:3000` | | `woodpecker` + agent | CI wired to gitea (profile `ci`) | `http://woodpecker:8000` | -### Quickstart — catalog + drop area +### Quickstart — catalog only ```sh cd examples/compose @@ -89,10 +88,6 @@ curl -X POST -H "X-Update-Secret: example-update-secret" \ "http://localhost:8080/build/publish?platform=love&name=demo&version=0.1.0" ``` -(Dropping the files in over the SSH drop area — `scp -P 2222 demo-0.1.0.* -drop@localhost:drop/`, password `DROP_PASSWORD` from `.env` — works just as -well; the updater only cares that the files end up in `file_container_path`.) - `GET /api/software` now lists *Demo Game* with `html` and `win_x64` assets, `http://localhost:8080/file/demo-0.1.0/index.html` serves the extracted web build, and `GET /api/download?path=demo-0.1.0-win-x64.zip` serves the @@ -221,8 +216,7 @@ Publishing a release from CI is two steps: 1. **Upload** build artifacts into `file_container_path`, named by convention: `-.metadata.json`, `-.html.zip`, `--win-x64.zip`, `-.tic`, ... (each platform - declares which asset kinds it expects — see `GET /api/builds`). Either - drop the files in over the shared volume (SSH drop area), or push them + declares which asset kinds it expects — see `GET /api/builds`). Push them over HTTP — one request per file, `upload` scope, optional `sha256` integrity check: diff --git a/libs/ruby/warp_engine/app/controllers/warp_engine/build/uploads_controller.rb b/libs/ruby/warp_engine/app/controllers/warp_engine/build/uploads_controller.rb index 02144bd..b176ef7 100644 --- a/libs/ruby/warp_engine/app/controllers/warp_engine/build/uploads_controller.rb +++ b/libs/ruby/warp_engine/app/controllers/warp_engine/build/uploads_controller.rb @@ -13,7 +13,7 @@ module WarpEngine # --.zip — az updater is ezeket keresi. NAME_FORMAT = /\A[A-Za-z0-9._-]+\z/ - api :POST, "/build/upload", "Upload a build artifact into the drop area" + api :POST, "/build/upload", "Upload a build artifact into the artifact directory" header "X-Update-Secret", "Shared secret or application token (upload scope)", required: true param :name, String, required: true, desc: "Software name (filename must be prefixed with -)" param :version, String, required: true, desc: "Version string" diff --git a/libs/ruby/warp_engine/examples/compose/.env.example b/libs/ruby/warp_engine/examples/compose/.env.example index 3f208ba..f4625f3 100644 --- a/libs/ruby/warp_engine/examples/compose/.env.example +++ b/libs/ruby/warp_engine/examples/compose/.env.example @@ -6,12 +6,8 @@ MYSQL_ROOT_PASSWORD=warpengine # Shared secret for the /build/* endpoints (X-Update-Secret header). UPDATE_SECRET=example-update-secret -# Password of the "drop" user on the artifact drop area (SSH, port 2222). -DROP_PASSWORD=drop - # Published ports. APP_PORT=8080 -DROPAREA_SSH_PORT=2222 GITEA_SSH_PORT=2223 # --- profile "ci" only ------------------------------------------------------- diff --git a/libs/ruby/warp_engine/examples/compose/docker-compose.yml b/libs/ruby/warp_engine/examples/compose/docker-compose.yml index 2ce8abb..fa45997 100644 --- a/libs/ruby/warp_engine/examples/compose/docker-compose.yml +++ b/libs/ruby/warp_engine/examples/compose/docker-compose.yml @@ -3,12 +3,10 @@ # mysql the catalog database # app a minimal Rails host with the engine mounted from this # repo checkout (headless: API + updater, no ActiveAdmin) -# droparea SSH server where build pipelines drop artifacts; shares -# the "softwares" volume with the app # gitea (profile "ci") the git forge # woodpecker (profile "ci") CI server + agent, wired to gitea # -# Quickstart (catalog + drop area only): +# Quickstart (catalog only): # cp .env.example .env # docker compose up --build # @@ -51,24 +49,6 @@ services: - softwares:/softwares - images:/images - # SSH landing zone for build artifacts. Pipelines (or you, with scp) upload - # into ~/drop here; the app sees the same files under /softwares. - droparea: - image: linuxserver/openssh-server - environment: - PUID: 1 - PGID: 1 - SUDO_ACCESS: "false" - PASSWORD_ACCESS: "true" - USER_NAME: drop - USER_PASSWORD: ${DROP_PASSWORD:-drop} - ports: - - "${DROPAREA_SSH_PORT:-2222}:2222" - volumes: - # A subdir of the drop user's home (/config), so sshd's own state files - # never end up in the catalog directory. - - softwares:/config/drop - # --- profile "ci": the forge + CI producing releases for the catalog ------ # # gitea and woodpecker refer to each other by their service names, so your @@ -113,7 +93,7 @@ services: WOODPECKER_SERVER: "woodpecker:9000" WOODPECKER_AGENT_SECRET: ${WOODPECKER_AGENT_SECRET:-example-agent-secret} # Attach pipeline containers to the stack network so steps can reach - # gitea, droparea and the app by service name. + # gitea and the app by service name. WOODPECKER_BACKEND_DOCKER_NETWORK: warp-example volumes: - /var/run/docker.sock:/var/run/docker.sock