Deploy Guide
Build and run the local source with Docker Compose.
English
简体中文Clone GitLab main
Install Git, Docker, and Docker Compose V2. Access to the GitLab repository is required.
git clone --branch main --single-branch https://gitlab.vetoedkkb.com/short-links/web.git wr.do
cd wr.do
cp .env.example .envFor an existing installation, keep your .env instead of copying over it. Set separate random values for POSTGRES_PASSWORD and AUTH_SECRET; run openssl rand -hex 32 twice to generate them.
APP_PORT=3100
POSTGRES_PASSWORD=replace-with-a-random-database-password
AUTH_SECRET=replace-with-another-random-secret
NEXT_PUBLIC_APP_URL=http://localhost:3100
AUTH_URL=http://localhost:3100Keep .env private. Default Compose supplies the database connection for the postgres service. See Installation for optional configuration.
Build and start
docker compose build
docker compose up -d
docker compose ps -aThe Dockerfile builds the application and migration service from local source. Only official Node.js and PostgreSQL images are used as base services; no prebuilt WR.DO image is used.
The migrate service runs prisma migrate deploy after PostgreSQL becomes healthy. Its normal final state is Exited (0). The application starts after migration succeeds.
Open http://localhost:3100. The initial administrator is [email protected] / 123456; change the password after first login.
Ports and services
Default Compose binds the application to 127.0.0.1:3100 and does not expose PostgreSQL to the host. Change APP_PORT, NEXT_PUBLIC_APP_URL, and AUTH_URL together when changing the port, then rebuild. External access requires a reverse proxy and your own application URL.
NEXT_PUBLIC_* values are embedded during the build and need a rebuild after changes. GitHub OAuth, Google, LinuxDO, Cloudflare DNS, email, and S3 storage need separate configuration. Password login works without these external services; disable unconfigured login providers in administration.
Logs, backups, and updates
docker compose logs --tail=100 app migrate postgres
# Store the backup outside Git
mkdir -p ../wrdo-backups
docker compose exec -T postgres pg_dump -U wrdo wrdo > ../wrdo-backups/wrdo-backup-$(date +%Y%m%d-%H%M%S).sql
# Stop without deleting PostgreSQL data
docker compose downThe postgres-data volume keeps the database between restarts. docker compose down -v deletes it. Keep backups private. Save local changes before updating from GitLab main.