Add deployment workflow to push code to Gitea and redeploy on Mac Mini
Configure Replit project for deployment to a self-hosted Gitea repository, including a `deploy.sh` script on a Mac Mini to pull changes, stop, rebuild, and restart Docker containers. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 1fa9329f-0cec-4a2f-80e8-e26dbae3142e Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 29017a07-e519-4b14-bdf7-b913b959d38f Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/4d696b13-86f2-4c9d-be0d-95b293430047/1fa9329f-0cec-4a2f-80e8-e26dbae3142e/ODGOKcj Replit-Helium-Checkpoint-Created: true
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
#
|
||||
# API server image (Express, esbuild bundle).
|
||||
#
|
||||
# NOTE: the pnpm-workspace `overrides` strip every native binary that is not
|
||||
# linux-x64-gnu (no musl, no arm64, no darwin). The image therefore MUST be a
|
||||
# glibc/amd64 image — use node:*-bookworm-slim (NOT alpine) and build for
|
||||
# linux/amd64 (Docker on Apple Silicon runs this under emulation/Rosetta).
|
||||
|
||||
# ---- Build stage -----------------------------------------------------------
|
||||
FROM --platform=linux/amd64 node:24-bookworm-slim AS build
|
||||
|
||||
ENV PNPM_HOME=/pnpm
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN corepack enable && corepack prepare pnpm@9 --activate
|
||||
|
||||
WORKDIR /repo
|
||||
COPY . .
|
||||
|
||||
RUN pnpm install --frozen-lockfile
|
||||
RUN NODE_ENV=production pnpm --filter @workspace/api-server run build
|
||||
|
||||
# ---- Runtime stage ---------------------------------------------------------
|
||||
FROM --platform=linux/amd64 node:24-bookworm-slim AS runtime
|
||||
|
||||
ENV NODE_ENV=production
|
||||
WORKDIR /app
|
||||
|
||||
# esbuild produces a self-contained bundle (index.mjs + pino transport files).
|
||||
COPY --from=build /repo/artifacts/api-server/dist ./dist
|
||||
|
||||
# PORT is supplied by docker-compose (defaults there to 8080).
|
||||
EXPOSE 8080
|
||||
CMD ["node", "--enable-source-maps", "dist/index.mjs"]
|
||||
Reference in New Issue
Block a user