docs: narrow local deployment guidance

This commit is contained in:
JW 2026-03-27 13:43:42 +08:00
parent f5348133cd
commit 49f28bd30e
5 changed files with 6 additions and 82 deletions

View file

@ -1,7 +1,7 @@
CONVERTX_CONTAINER_NAME=convertx
CONVERTX_PORT=3000
CONVERTX_DATA_DIR=./data
CONVERTX_IMAGE_REF=ghcr.io/c4illin/convertx@sha256:e1f85be04bbaf8a55ead9261194c3ae0fa0957d303ea537127154860b2552afd
CONVERTX_IMAGE=ghcr.io/c4illin/convertx
JWT_SECRET=change-this-to-a-long-random-string
HTTP_ALLOWED=true
AUTO_DELETE_EVERY_N_HOURS=24

View file

@ -60,7 +60,6 @@ Any missing converter? Open an issue or pull request!
For repository-specific local usage and upgrade workflow, see:
- [`docs/local-deploy.md`](docs/local-deploy.md)
- [`UPGRADE.md`](UPGRADE.md)
```yml
# docker-compose.yml
@ -84,6 +83,8 @@ or
docker run -p 3000:3000 -v ./data:/app/data ghcr.io/c4illin/convertx
```
Then visit `http://localhost:3000` in your browser and create your account. Don't leave it unconfigured and open, as anyone can register the first account.
If you get unable to open database file run `chown -R $USER:$USER path` on the path you choose.
### Environment variables

View file

@ -1,78 +0,0 @@
# Upgrading From Upstream
This repository is easiest to maintain long-term if you treat upstream and local customizations separately.
## Recommended remote layout
Use a fork and keep the original project as `upstream`:
```bash
git remote rename origin upstream
git remote add origin <your-fork-url>
git fetch --all --tags
```
Expected result:
- `origin`: your fork
- `upstream`: `https://github.com/C4illin/ConvertX.git`
## Keep local changes low-conflict
Prefer keeping local operational changes in additive files instead of editing upstream-heavy files:
- `compose.local.yaml`
- `.env.local.example`
- `docs/local-deploy.md`
- `UPGRADE.md`
That keeps future merges simpler than carrying large changes in `README.md`, `Dockerfile`, or runtime code.
## Upgrade workflow
1. Fetch upstream changes:
```bash
git fetch upstream --tags
```
2. Create a dedicated upgrade branch from your mainline:
```bash
git switch main
git pull --ff-only origin main
git switch -c codex/upgrade-convertx-<target-version>
```
3. Merge the upstream release you want to adopt:
```bash
git merge upstream/main
```
If you are tracking a specific release tag, merge or inspect that tag explicitly before continuing.
4. Resolve conflicts, keeping local deployment files unless upstream introduces a better replacement
5. Decide whether to bump `CONVERTX_IMAGE_REF` in `.env.local.example`
6. Re-run verification:
```bash
bun run build
bun test
docker compose --env-file .env.local -f compose.local.yaml config
docker compose --env-file .env.local -f compose.local.yaml up -d
curl -fsS http://127.0.0.1:3000/healthcheck
```
7. Smoke-test the UI in a browser and verify at least one conversion path you rely on
8. Commit the upgrade and open a PR
## When to bump the pinned image reference
Upstream currently documents floating image tags such as `latest` and `main`. For local stability, pin the deployed image by digest and update `CONVERTX_IMAGE_REF` only after:
- you have reviewed upstream release notes
- the new image starts cleanly
- your required conversions still work
This keeps rollback simple and makes production state inspectable from the env file.

View file

@ -1,6 +1,6 @@
services:
convertx:
image: ${CONVERTX_IMAGE_REF:-ghcr.io/c4illin/convertx@sha256:e1f85be04bbaf8a55ead9261194c3ae0fa0957d303ea537127154860b2552afd}
image: ${CONVERTX_IMAGE:-ghcr.io/c4illin/convertx}
container_name: ${CONVERTX_CONTAINER_NAME:-convertx}
restart: unless-stopped
ports:

View file

@ -35,6 +35,7 @@ curl -fsS http://127.0.0.1:3000/healthcheck
```
5. Open `http://localhost:3000`
6. Create the first account before exposing the service to anyone else
## Useful operations
@ -66,4 +67,4 @@ docker compose --env-file .env.local -f compose.local.yaml restart
- The persistent database and job files are stored in `./data`
- `HTTP_ALLOWED=true` is appropriate for localhost usage
- The image reference is pinned through `CONVERTX_IMAGE_REF`, using an immutable digest instead of the floating `latest` tag
- `CONVERTX_IMAGE` defaults to the published release image and can be overridden if you need a different tag