ci) add gitea actions and refresh readme (#1)
Some checks failed
Build and Push Image / docker-build-and-push (push) Failing after 2m13s
Some checks failed
Build and Push Image / docker-build-and-push (push) Failing after 2m13s
Summary:\n- replace scaffold README with project-specific setup, testing, Docker, and CI docs\n- add PR workflow to run lint, unit tests, app build, and Docker build\n- add main-branch workflow to build and push Docker images to Gitea registry\n\nNotes:\n- publish workflow expects REGISTRY_USERNAME and REGISTRY_PASSWORD repository secrets\n- image tags pushed: latest and short commit SHA\n\nTesting:\n- not run locally (workflows execute in Gitea Actions) Reviewed-on: CampbellWireless/trips#1 Co-authored-by: Shaun Campbell <shaun@campbellwireless.net> Co-committed-by: Shaun Campbell <shaun@campbellwireless.net>
This commit was merged in pull request #1.
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -7,24 +7,22 @@ WORKDIR /app
|
||||
COPY package.json bun.lock ./
|
||||
|
||||
# Install all deps (including devDependencies needed for the build).
|
||||
# better-sqlite3 is a native module — it must be compiled here on Linux,
|
||||
# not copied from a macOS node_modules.
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
# Copy source and build
|
||||
COPY . .
|
||||
RUN bun run build
|
||||
|
||||
# Prune to production-only deps, recompiling native modules for Linux
|
||||
# Prune to production-only deps
|
||||
RUN bun install --frozen-lockfile --production
|
||||
|
||||
# ── Runtime stage ───────────────────────────────────────────────────────────────
|
||||
FROM node:22-alpine AS runtime
|
||||
FROM oven/bun:1 AS runtime
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Create a non-root user to run the app
|
||||
RUN addgroup -S trips && adduser -S trips -G trips
|
||||
RUN groupadd --system trips && useradd --system --gid trips trips
|
||||
|
||||
# Copy the built app and production node_modules from the builder
|
||||
COPY --from=builder /app/build ./build
|
||||
@@ -42,4 +40,4 @@ ENV PORT=3000
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "build"]
|
||||
CMD ["bun", "build/index.js"]
|
||||
|
||||
Reference in New Issue
Block a user