Docker: run broke fully on your own server
Dockerfile builds this checkout. docker/docker-compose.yml adds Supabase's Postgres, Auth and PostgREST behind one nginx address, Mailpit for sign-in links, and Ollama under the ai profile. docker/setup.mjs writes fresh secrets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5297d8dfa6
commit
44aa5e0933
9 files changed
+382
No files matched your search
+26
@@ -0,0 +1,26 @@
|
||||
# broke as one container. Built from this checkout, so it runs exactly the commit you have here.
|
||||
# Use docker/docker-compose.yml to run it with its own database and sign-in (see docker/README.md).
|
||||
#
|
||||
# NEXT_PUBLIC_* values are built into the browser code, so they are build args. Change them and you rebuild.
|
||||
|
||||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci --no-audit --no-fund
|
||||
COPY . .
|
||||
ARG NEXT_PUBLIC_SUPABASE_URL
|
||||
ARG NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY
|
||||
ENV NEXT_PUBLIC_SUPABASE_URL=$NEXT_PUBLIC_SUPABASE_URL \
|
||||
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=$NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY \
|
||||
NEXT_TELEMETRY_DISABLED=1
|
||||
RUN npm run build
|
||||
|
||||
FROM node:22-alpine
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production NEXT_TELEMETRY_DISABLED=1 PORT=3000
|
||||
COPY --from=build --chown=node:node /app /app
|
||||
USER node
|
||||
EXPOSE 3000
|
||||
# next start directly, not scripts/start.mjs: that one git-pulls on every start and listens on 127.0.0.1 only.
|
||||
# Database changes in supabase/migrations still apply on start (src/instrumentation.ts) through SUPABASE_DB_URL.
|
||||
CMD ["node_modules/.bin/next", "start", "-H", "0.0.0.0", "-p", "3000"]
|
||||
Reference in new issue
Block a user