|
| 1 | +# Clever Cloud deployment |
| 2 | + |
| 3 | +## Setup |
| 4 | + |
| 5 | +### Clever Cloud interface |
| 6 | + |
| 7 | +Create 2 Rust applications with the `XS` plan: |
| 8 | +* `vaultwarden` |
| 9 | + |
| 10 | +And 1 PostgreSQL databases (version 15) with any plan that you will binding to each app accordingly: |
| 11 | +* `vaultwarden` |
| 12 | + |
| 13 | +Add 1 FS Bucket addons: |
| 14 | +* `vaultwarden` |
| 15 | + |
| 16 | +_(depending on when you created those addonds, don't forget to bind them to the appropriate application)_ |
| 17 | + |
| 18 | +Now set for the app these options: |
| 19 | +* Zero downtime deployment |
| 20 | +* Cancel ongoing deployment on new push |
| 21 | +* Force HTTPS |
| 22 | + |
| 23 | +Adjust the domain names as you want, and configure the environment variables as follow: |
| 24 | +* `ADMIN_TOKEN`: [SECRET] _(to enable admin panel, for detail see the [wiki](https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page#secure-the-admin_token))_ |
| 25 | +* `CC_CACHE_DEPENDENCIES`: `true` |
| 26 | +* `CC_FS_BUCKET`: [GENERATED] _(can be retrieved from the FS Bucket addons and use `/data:` as local folder)_ |
| 27 | +* `CC_POST_BUILD_HOOK`: `clevercloud/post_build_hook.sh` |
| 28 | +* `DATABASE_MAX_CONNS`: `1` _(only when using DEV plan on pg addon, to avoid `too many clients` error)_ |
| 29 | +* `DATABASE_URL`: [GENERATED] _(provided by the interface)_ |
| 30 | +* `DOMAIN`: [GENERATED] _(either your configured domain, or the cleverapp.io one provided by the interface)_ |
| 31 | +* `ORG_GROUPS_ENABLED`: `true` |
| 32 | +* `ROCKET_ADDRESS`: `0.0.0.0` |
| 33 | +* `ROCKET_PORT`: `8080` |
| 34 | + |
| 35 | +### GitHub interface |
| 36 | + |
| 37 | +#### GitHub Actions |
| 38 | + |
| 39 | +Configure the following repository secrets (not environment ones): |
| 40 | + |
| 41 | +- `CLEVER_APP_ID`: [GENERATED] _(format `app_{uuid}`, can be retrieved into the Clever Cloud interface)_ |
| 42 | +- `CLEVER_TOKEN`: [GENERATED] _(can be retrieved from `clever login`, but be warned it gives wide access)_ |
| 43 | +- `CLEVER_SECRET`: [GENERATED] _(can be retrieved from `clever login`, but be warned it gives wide access)_ |
| 44 | + |
| 45 | +## Upgrade Vaultwarden version |
| 46 | + |
| 47 | +1. Synchronize your fork with the original repository |
| 48 | +2. Search for the specific commit representing the wanted version |
| 49 | +3. Rebase your `deploy` branche to it while making sure to not take third-party files into `.github`. Make also sure to keep local changes in `Cargo.toml` |
| 50 | +4. Force-push the branch |
0 commit comments