deploy: add Dockerfile + .dockerignore for Coolify
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
node_modules
|
||||||
|
data
|
||||||
|
.git
|
||||||
|
.dist
|
||||||
|
*.md
|
||||||
|
.opencode
|
||||||
|
.superpowers
|
||||||
|
graphify-out
|
||||||
|
screenshots
|
||||||
|
docs
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
# ---- Build frontend ----
|
||||||
|
FROM node:22-slim AS web-build
|
||||||
|
WORKDIR /app
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm ci
|
||||||
|
COPY . .
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# ---- Runtime ----
|
||||||
|
FROM node:22-slim
|
||||||
|
WORKDIR /app
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
ENV HOST=0.0.0.0
|
||||||
|
ENV PORT=3000
|
||||||
|
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm ci --omit=dev && npm cache clean --force
|
||||||
|
|
||||||
|
# Built frontend (vite outputs to dist/)
|
||||||
|
COPY --from=web-build /app/dist ./dist
|
||||||
|
|
||||||
|
# Server source (tsx runs TS directly in production)
|
||||||
|
COPY server ./server
|
||||||
|
COPY shared ./shared
|
||||||
|
COPY tsconfig.json ./
|
||||||
|
|
||||||
|
# Persistent SQLite data
|
||||||
|
RUN mkdir -p /app/data
|
||||||
|
VOLUME /app/data
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
CMD ["npx", "tsx", "server/index.ts"]
|
||||||
Reference in New Issue
Block a user