Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CONVERTX_CONTAINER_NAME=convertx
CONVERTX_PORT=3000
CONVERTX_DATA_DIR=./data
CONVERTX_IMAGE=ghcr.io/c4illin/convertx
JWT_SECRET=change-this-to-a-long-random-string
HTTP_ALLOWED=true
AUTO_DELETE_EVERY_N_HOURS=24
TZ=Asia/Shanghai
ACCOUNT_REGISTRATION=false
ALLOW_UNAUTHENTICATED=false
MAX_CONVERT_PROCESS=0
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ package-lock.json
/dist
/Bruno
/tsconfig.tsbuildinfo
/public/generated.css
/public/generated.css
/.worktrees
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ Any missing converter? Open an issue or pull request!
> [!WARNING]
> If you can't login, make sure you are accessing the service over localhost or https otherwise set HTTP_ALLOWED=true

For repository-specific local usage and upgrade workflow, see:

- [`docs/local-deploy.md`](docs/local-deploy.md)

```yml
# docker-compose.yml
services:
Expand Down
23 changes: 23 additions & 0 deletions compose.local.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
services:
convertx:
image: ${CONVERTX_IMAGE:-ghcr.io/c4illin/convertx}
container_name: ${CONVERTX_CONTAINER_NAME:-convertx}
restart: unless-stopped
ports:
- "${CONVERTX_PORT:-3000}:3000"
environment:
JWT_SECRET: ${JWT_SECRET:?set JWT_SECRET in .env.local}
HTTP_ALLOWED: ${HTTP_ALLOWED:-true}
AUTO_DELETE_EVERY_N_HOURS: ${AUTO_DELETE_EVERY_N_HOURS:-24}
TZ: ${TZ:-UTC}
ACCOUNT_REGISTRATION: ${ACCOUNT_REGISTRATION:-false}
ALLOW_UNAUTHENTICATED: ${ALLOW_UNAUTHENTICATED:-false}
MAX_CONVERT_PROCESS: ${MAX_CONVERT_PROCESS:-0}
volumes:
- ${CONVERTX_DATA_DIR:-./data}:/app/data
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:3000/healthcheck"]
interval: 30s
timeout: 10s
retries: 5
start_period: 20s
70 changes: 70 additions & 0 deletions docs/local-deploy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Local Docker Deployment

This repository includes a dedicated Compose file for normal local usage without rebuilding the image from source.

## Why use this instead of `compose.yaml`

- `compose.local.yaml` pulls the published ConvertX image
- `compose.yaml` builds from the local checkout and is intended for development and testing
- Keeping them separate makes upgrades easier and avoids accidentally coupling local usage to repository state

## Prerequisites

- Docker Desktop or a compatible Docker Engine

## First-time setup

1. Copy the example environment file:

```bash
cp .env.local.example .env.local
```

2. Set a long random `JWT_SECRET` in `.env.local`
3. Start the service:

```bash
docker compose --env-file .env.local -f compose.local.yaml up -d
```

4. Verify the service is healthy:

```bash
docker compose --env-file .env.local -f compose.local.yaml ps
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

Start or update the container:

```bash
docker compose --env-file .env.local -f compose.local.yaml up -d
```

Stop the container:

```bash
docker compose --env-file .env.local -f compose.local.yaml down
```

View logs:

```bash
docker compose --env-file .env.local -f compose.local.yaml logs -f
```

Restart after changing configuration:

```bash
docker compose --env-file .env.local -f compose.local.yaml restart
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The docs recommend docker compose restart after config changes, which can leave updated env/compose/image settings unapplied because containers are not recreated.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/local-deploy.md, line 62:

<comment>The docs recommend `docker compose restart` after config changes, which can leave updated env/compose/image settings unapplied because containers are not recreated.</comment>

<file context>
@@ -0,0 +1,69 @@
+Restart after changing configuration:
+
+```bash
+docker compose --env-file .env.local -f compose.local.yaml restart
+```
+
</file context>
Suggested change
docker compose --env-file .env.local -f compose.local.yaml restart
docker compose --env-file .env.local -f compose.local.yaml up -d
Fix with Cubic

```

## Notes

- The persistent database and job files are stored in `./data`
- `HTTP_ALLOWED=true` is appropriate for localhost usage
- `CONVERTX_IMAGE` defaults to the published release image and can be overridden if you need a different tag
Loading