This commit introduces a comprehensive deployment strategy that unifies the frontend and backend into a single Docker container served by the Rust backend, streamlining the deployment process and improving production architecture.
Key changes:
- Split CI/CD workflows: separated build.yaml (for CI/PR checks) and deploy.yaml (for production deployment)
- Implemented unified Docker deployment where the Axum server serves both API routes (under /api) and frontend static files
- Added GitHub Container Registry integration for Docker image distribution
- Updated Railway configuration to use the new healthcheck path (/api/health)
- Enhanced postgres.ts script with named volumes and constants for better container management
- Added API client utilities (web/lib/api.ts) and environment configuration (web/.env.example) for frontend-backend communication
- Configured Vite proxy for local development while supporting same-origin requests in production
- Updated Dockerfile to include frontend static files and proper environment variable handling
This architecture eliminates the need for separate deployments and CORS configuration, as the frontend and API are served from the same origin.
- Add web frontend build step to compile Vike site
- Change artifact upload path from ./dist/ to ./web/dist/
- Install web dependencies before building frontend
cargo-vcpkg installs to target/vcpkg but rust-sdl2's vcpkg-rs crate
auto-detection doesn't reliably find it on all platforms. Set VCPKG_ROOT
explicitly to ensure consistent library discovery across platforms.
Cache restore-keys allowed old vcpkg builds to be restored when baseline
changed, causing persistent failures. Extract vcpkg version from Cargo.toml
using cargo metadata and use it as primary cache key component.
- Extract vcpkg baseline via cargo metadata (structured parsing)
- Unified vcpkg cache with version-isolated keys
- Removed manual macOS vcpkg setup and A/B test steps
- Cache cargo-vcpkg binary for faster builds
Adds cargo-vcpkg step alongside manual vcpkg for macOS to determine if
the fix is due to using manual vcpkg or simply upgrading to vcpkg
2025.10.17. Both methods will run to compare behavior.
- Updated vcpkg baseline from 2024.11.16 to 2025.10.17
- Restored macOS triplets in Cargo.toml
- Added duplicate cargo-vcpkg step for macOS builds
Replaces cargo-vcpkg with direct vcpkg installation for macOS to fix
libogg build failures. Uses vcpkg 2025.10.17 with proper SDL2 package
installation and VCPKG_ROOT environment variable for rust-sdl2
integration. Windows and Linux continue using cargo-vcpkg.
Update GitHub Actions workflows to use correct Cargo.toml/Cargo.lock paths
in root directory instead of pacman/ subdirectory. Fix Justfile web command
to serve from web/dist/client instead of pacman/dist.
This is just because managing both 1.86 and 1.88 is really annoying, so
it's better to just be unified. There's no real point to using 1.88
besides more clippy warnings, which are already impeding my work right
now. So we're downgrading.