Deployment wrapper for Cloudreve on Railway.
FROM cloudreve/cloudreve:latest plus one entrypoint. It exists because three
things cannot be expressed as Railway variables:
- The bundled aria2 downloader. The published image's entrypoint runs
supervisordwith anaria2c --enable-rpc --listen-port 6888 --dht-listen-port 6888unit on every boot, and the app gates the feature onCR_ENABLE_ARIA2being present rather than on its value — so no variable turns it off. The build removes the unit and the binary; the entrypoint removes the baked variable. - The first administrator. Cloudreve promotes the first account that registers to the admin group. On a public URL that is a race, so the entrypoint registers the admin against a loopback-only listener before the public port is ever opened, then turns off open registration.
- The site URL.
siteURLis seeded into the database on the first migration only and defaults tohttp://localhost:5212. The entrypoint reconciles it withRAILWAY_PUBLIC_DOMAIN, and leaves any custom domain alone.
| Variable | Default | Purpose |
|---|---|---|
CR_ADMIN_EMAIL |
admin@example.com |
login of the seeded administrator |
CR_ADMIN_PASSWORD |
generated | its password; when unset one is generated, printed once, and written to <volume>/initial_admin_password.txt |
CR_SKIP_BOOTSTRAP |
0 |
1 starts the server directly with no first-run setup |
CR_BOOTSTRAP_PORT |
5399 |
loopback port used during first-run setup |
PORT |
5212 |
public listen port |
Everything else is Cloudreve's own CR_CONF_<Section>.<Key> and
CR_SETTING_DEFAULT_<key> interface.
Cloudreve is GPL-3.0. This wrapper adds no application code.