Migrate Aphanite to New Era #1

Merged
tuxium merged 8 commits from enita/migrate-aphanite-to-new-era into main 2026-10-24 11:37:51 +08:00 AGit
Owner

Summary

Migrate the source code to git.feniota.org and docs site to mc.feniota.org, marking a new era in Aphanite development.

Changes

Docker & deployment

  • Single-stage scratch build: Replaced the multi-stage (node → rust-slim → fedora-minimal) Dockerfile with a single quay.io/lingrottin/runners:rust-musl build stage producing a static musl binary, copied into a minimal scratch image running as UID 1000.
  • Bundled CA certs: Added an optional bundle-certs Cargo feature (webpki-root-certs) so the binary embeds Mozilla root certs and doesn't depend on a system CA store. The Docker build enables it.
  • Auto-init: Renamed APHANITE_IS_CONTAINER → APHANITE_AUTO_INIT. When set, AppConfig::read initializes the config file automatically, removing the need for the docker-entrypoint.sh wrapper (now deleted).
  • Dropped the separate pnpm/Node.js setup steps; frontend and backend now build in one stage.

Backend (src/lib.rs)

  • Graceful shutdown: Added a shutdown_signal() handler (Ctrl+C + SIGTERM) wired into axum::serve, and the cron scheduler is now shut down cleanly on exit.
  • Conditionally builds the reqwest HTTP client with bundled certs when the feature is enabled.

Frontend

  • Toast i18n: Toasts now carry an i18n_key + optional i18n_args instead of a plain message string, rendered through the Trans component. Updated all toast call sites across Management, PlayerProfileDetails, PlayerProfiles, User, Home, and Login pages. (This solves GH-20)

Site migration & config

  • Repointed all documentation, schema, and cape asset URLs from phenocryst.feniota.org / assets.ferris.love / GitHub to the new mc.feniota.org, assets.feniota.org, and git.feniota.org locations (README, capes.json, capes.README.md, copilot-instructions).
  • Removed the pnpm/Node setup steps from the Forgejo frontend workflow.
  • Updated .zed/settings.json language-server config (added typescript-language-server, disabled vstls).

Continous Integration

  • pnpm/action-setup and actions/setup-node are dropped in favor of the bundled Node.js v24 and pnpm v12 in the CI image. (Details)
## Summary Migrate the source code to git.feniota.org and docs site to mc.feniota.org, marking a new era in Aphanite development. ## Changes ### Docker & deployment - **Single-stage `scratch` build**: Replaced the multi-stage (node → rust-slim → fedora-minimal) Dockerfile with a single `quay.io/lingrottin/runners:rust-musl` build stage producing a static musl binary, copied into a minimal `scratch` image running as UID `1000`. - **Bundled CA certs**: Added an optional `bundle-certs` Cargo feature (`webpki-root-certs`) so the binary embeds Mozilla root certs and doesn't depend on a system CA store. The Docker build enables it. - **Auto-init**: Renamed `APHANITE_IS_CONTAINER` → `APHANITE_AUTO_INIT`. When set, `AppConfig::read` initializes the config file automatically, removing the need for the `docker-entrypoint.sh` wrapper (now deleted). - Dropped the separate pnpm/Node.js setup steps; frontend and backend now build in one stage. ### Backend (`src/lib.rs`) - **Graceful shutdown**: Added a `shutdown_signal()` handler (Ctrl+C + SIGTERM) wired into `axum::serve`, and the cron scheduler is now shut down cleanly on exit. - Conditionally builds the reqwest HTTP client with bundled certs when the feature is enabled. ### Frontend - **Toast i18n**: Toasts now carry an `i18n_key` + optional `i18n_args` instead of a plain `message` string, rendered through the `Trans` component. Updated all toast call sites across `Management`, `PlayerProfileDetails`, `PlayerProfiles`, `User`, `Home`, and `Login` pages. (This solves [GH-20](https://github.com/feniota/aphanite/issues/20)) ### Site migration & config - Repointed all documentation, schema, and cape asset URLs from `phenocryst.feniota.org` / `assets.ferris.love` / GitHub to the new `mc.feniota.org`, `assets.feniota.org`, and `git.feniota.org` locations (README, `capes.json`, `capes.README.md`, copilot-instructions). - Removed the pnpm/Node setup steps from the Forgejo frontend workflow. - Updated `.zed/settings.json` language-server config (added `typescript-language-server`, disabled `vstls`). ### Continous Integration - `pnpm/action-setup` and `actions/setup-node` are dropped in favor of the bundled Node.js v24 and pnpm v12 in the CI image. ([Details](https://git.feniota.org/enita/action-runners))
Fixes GH-20
Refactor Docker image to single-stage build and add graceful shutdown
Some checks failed
Frontend checks / lint (pull_request) Has been cancelled
Rust / build (pull_request) Has been cancelled
09e0899fa4
- Switch to a single-stage Rust build targeting musl for the final image
- Remove docker-entrypoint.sh and inline initialization logic into config.rs
- Detect container environment via APHANITE_IS_CONTAINER env var to auto-init config
- Add graceful shutdown handling for SIGTERM and Ctrl+C with scheduler cleanup
Drop pnpm & node.js setup
Some checks failed
Frontend checks / lint (pull_request) Successful in 6m51s
Rust / build (pull_request) Has been cancelled
2af811e41f
The base image already contains them
enita requested review from tuxium 2026-10-23 19:18:04 +08:00
tuxium scheduled this pull request to auto merge when all checks succeed 2026-10-24 00:21:41 +08:00
Bundle Mozilla CA certs to support scratch-based Docker images
All checks were successful
Frontend checks / lint (pull_request) Successful in 1m42s
Rust / build (pull_request) Successful in 10m7s
8315b1036a
Add a bundle-certs feature that embeds webpki-root-certs and configures
reqwest to use them. Use this client in production builds so the binary
no longer depends on a system CA store, allowing the Docker image to drop
ca-certificates.crt and SSL_CERT_FILE when built with --features
bundle-certs.
enita canceled auto merging this pull request when all checks succeed 2026-10-24 03:10:38 +08:00
Migrate to new site
Some checks failed
Frontend checks / lint (pull_request) Failing after 1m35s
Rust / build (pull_request) Has been cancelled
93cc5210ff
Update capes.README.md
Some checks failed
Frontend checks / lint (pull_request) Failing after 1m15s
Rust / build (pull_request) Has been cancelled
efc6a588d3
enita changed title from Refactor Docker image to single-stage build and add graceful shutdown to Migrate Aphanite to New Era 2026-10-24 03:35:32 +08:00
Move copilot-instructions.md to AGENTS.md
All checks were successful
Frontend checks / lint (pull_request) Successful in 2m48s
Rust / build (pull_request) Successful in 1h9m0s
63b548cc15
enita scheduled this pull request to auto merge when all checks succeed 2026-10-24 03:42:04 +08:00
tuxium scheduled this pull request to auto merge when all checks succeed 2026-10-24 11:32:44 +08:00
tuxium changed title from Migrate Aphanite to New Era to WIP: Migrate Aphanite to New Era 2026-10-24 11:35:08 +08:00
tuxium changed title from WIP: Migrate Aphanite to New Era to Migrate Aphanite to New Era 2026-10-24 11:35:16 +08:00
tuxium approved these changes 2026-10-24 11:37:50 +08:00
tuxium left a comment

lgtm

lgtm
tuxium merged commit a58b9c65ca into main 2026-10-24 11:37:51 +08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
feniota/aphanite!1
No description provided.