Hallo Stroke

Docker

Dockerfiles and docker-compose for frontend and backend.

Backend

Multi-stage Dockerfile:

  • Builder: golang:1.24-bookworm, builds with -ldflags="-w -s" (stripped binary).
  • Runtime: debian:bookworm-slim, non-root appuser (uid 1000), tzdata + ca-certificates, HEALTHCHECK via wget /health, exposes 3001.

docker-compose.yml — two services on a hallo-network bridge:

ServiceImage / buildNotes
dbpostgres:18tuned postgresql.conf, init.sql mounted, healthcheck pg_isready, 512 MB mem limit
appbuilds from Dockerfiledepends_on: db: condition: service_healthy, all env vars injected, mounts ./build/uploads + app_logs volume, 512 MB / 1 CPU limit, 30s stop grace

init.sql enables uuid-ossp and creates enum types role_display_type, reminder_status, reminder_type.

Frontend

Multi-stage Dockerfile:

  • Builder: node:24-bookworm, runs npm run build. Contains a sed patch fixing an ESLint rule reference in AdminEditUserDashboard.js during build.
  • Runtime: nginx:alpine, serves the static SPA. nginx.conf falls back to index.html for client-side routing.

docker-compose.yml — builds with production API args, maps 3003:80, logs to json-file (10 MB × 3 files).

These docs

This docs site (hallostroke-docs) is a Next.js 16 app (Fumadocs) with its own Docker setup:

  • Builder: oven/bun:1.3.14 for bun install (fast), then node:24-alpine runs npm run build (Next standalone output).
  • Runtime: node:24-alpine, non-root nextjs user, runs the Next standalone server.js on port 3000.
services:
  docs:
    build: .
    image: hallostroke-docs
    container_name: hallostroke-docs
    ports:
      - "3000:3000"
    restart: unless-stopped

Why bun for install, node for build?

Bun's installer is faster, but bun run build crashed with a SIGILL on some CPUs (a known Bun bug). Using bun only for bun install --frozen-lockfile and node for the Next build avoids the crash while keeping the fast install.

On this page