Skip to content

Commit a2b07f0

Browse files
committed
mod(deploy): docker build deps version
1 parent c3c6c64 commit a2b07f0

5 files changed

Lines changed: 15 additions & 14 deletions

File tree

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@
183183
"tname",
184184
"touchgal",
185185
"trimpath",
186+
"trixie",
186187
"turbopack",
187188
"turbotrace",
188189
"Tyranor",

apps/api/cmd/server/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ func main() {
2323
cfg := config.Load()
2424

2525
// `server healthcheck` (container HEALTHCHECK on distroless, which has no
26-
// shell): probe the already-running server's /api/v1/health and exit 0/1.
26+
// shell): probe the already-running server's /healthz and exit 0/1.
2727
// No-op for the normal `server` invocation. Runs before app.New so the
2828
// probe never touches the DB/Redis.
29-
health.MaybeProbe(cfg.Server.Port, "/api/v1/health")
29+
health.MaybeProbe(cfg.Server.Port, "/healthz")
3030

3131
application := app.New(cfg)
3232
application.RegisterRoutes()

apps/api/internal/app/router.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ import (
99
)
1010

1111
func (a *App) RegisterRoutes() {
12-
// Versioned API prefix, aligned with the frontend apiBase=http://host/api/v1
13-
api := a.Fiber.Group("/api/v1")
14-
15-
// Liveness probe for container HEALTHCHECK (no auth, no DB touch). The
16-
// `server healthcheck` subcommand GETs this and exits 0/1 — see
17-
// cmd/server/main.go + pkg/health.
18-
api.Get("/health", func(c *fiber.Ctx) error {
12+
// Liveness probe — root /healthz, used by container HEALTHCHECK (no auth, no
13+
// DB touch). The `server healthcheck` subcommand GETs this and exits 0/1 —
14+
// see cmd/server/main.go + pkg/health. Unified to /healthz across services.
15+
a.Fiber.Get("/healthz", func(c *fiber.Ctx) error {
1916
return c.JSON(fiber.Map{"status": "ok"})
2017
})
2118

19+
// Versioned API prefix, aligned with the frontend apiBase=http://host/api/v1
20+
api := a.Fiber.Group("/api/v1")
21+
2222
auth := middleware.Auth(a.RDB, a.Config.OAuth)
2323
optionalAuth := middleware.OptionalAuth(a.RDB, a.Config.OAuth)
2424
// OAuth role mapping (see docs/user-migration/02-data-mapping.md §7):

docker/go.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
ARG GO_VERSION=1.26
1414

1515
# ---- build ----
16-
FROM golang:${GO_VERSION}-bookworm AS build
16+
FROM golang:${GO_VERSION}-trixie AS build
1717
WORKDIR /src
1818
# Manifests first → module-download layer is cached until go.mod/sum change.
1919
COPY apps/api/go.mod apps/api/go.sum ./
@@ -28,7 +28,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" \
2828
# (outbound HTTPS: OAuth, Wiki, image_service, B2/S3, SMTP TLS) + tzdata.
2929
# The server self-probes via `/app healthcheck` (pkg/health) for the container
3030
# HEALTHCHECK, since distroless has no shell/wget. Ports live in compose.
31-
FROM gcr.io/distroless/static-debian12:nonroot
31+
FROM gcr.io/distroless/static-debian13:nonroot
3232
COPY --from=build /out/app /app
3333
USER nonroot:nonroot
3434
ENTRYPOINT ["/app"]

docker/nuxt.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
# NOTE: the image CDN (`imageBed`) is still HARDCODED in app/config/moyu-moe.ts
1717
# (not env-driven) — align it with image_service before relying on hash-
1818
# addressed avatar/banner display. See docker/README.md §image_service.
19-
ARG NODE_VERSION=22
19+
ARG NODE_VERSION=24
2020

21-
FROM node:${NODE_VERSION}-bookworm-slim AS base
21+
FROM node:${NODE_VERSION}-trixie-slim AS base
2222
RUN corepack enable
2323
WORKDIR /repo
2424

@@ -60,7 +60,7 @@ RUN pnpm --filter "@apps/${APP}" run build
6060

6161
# ---- run: just Node + the self-contained .output (no pnpm, no sources) ----
6262
# sharp ships inside .output (built for linux in this same arch container).
63-
FROM node:${NODE_VERSION}-bookworm-slim AS run
63+
FROM node:${NODE_VERSION}-trixie-slim AS run
6464
ARG APP=web
6565
ENV NODE_ENV=production HOST=0.0.0.0 NITRO_PORT=3000
6666
WORKDIR /app

0 commit comments

Comments
 (0)