First to Site
Release 3.5

Candidate Environment & Port Scheme

Pre-production testing environment with isolated port allocation per environment

Overview

Added a candidate environment for pre-production testing alongside the existing preprod environment. All three environments (production, preprod, candidate) now have isolated port allocations, dedicated service processes, and their own release paths.

What Changed

Candidate Environment

Seven candidate subdomains deployed and verified:

SubdomainType
candidate.ftsonline.com.auPHP-FPM (Symfony)
candidate-ordering.ftsonline.com.auPHP-FPM (Ordering)
candidate-releases.ftsonline.com.auNext.js (Fumadocs)
candidate-docs.ftsonline.com.auStatic (Fumadocs export)
candidate-landing.ftsonline.com.auStatic
candidate-dossier.ftsonline.com.auStatic (Vite SPA)
candidate-dossier-api.ftsonline.com.auBun (TanStack Start)

Infrastructure: Cloudflare DNS, Let's Encrypt SSL, dedicated PHP-FPM pools, nginx vhosts, bare repo for builds.

Port Scheme

Each environment gets its own port range so processes never conflict:

AppProductionPreprodCandidate
releases (Next.js)300014000150001
dossier-api (Bun)300024000250002

Ports are configured via environment variables (PORT in .env.local for releases, PORT in systemd unit for dossier-api).

Service Management

AppManagerAuto-restart
releasesSupervisorOn crash + on boot
dossier-apiSystemdOn failure + on boot
messenger workersSupervisorHourly + on crash

Release Commands

bun run release:prod:safe -- master        # production
bun run release:preprod -- master          # preprod
bun run release:candidate -- master        # candidate

Each command sets the correct LIVE_LINK_NAME and BUILDS_DIR so the release script routes to the right environment.

Files Touched

FileChange
package.jsonrelease:candidate command
scripts/release-prod-safe.tsLIVE_LINK_NAME / BUILDS_DIR support
scripts/post-release.shCandidate branch for service restarts

Changelog Reference

  • feat: add release:candidate command for candidate environment (246134a)
  • fix: align post-release service restarts with new port scheme (fd3c38f)