deploy: add Dockerfile + .dockerignore for Coolify

This commit is contained in:
AgendaPro Dev
2026-07-27 10:11:47 -06:00
parent d796538fd9
commit bec3e45573
2 changed files with 42 additions and 0 deletions
+32
View File
@@ -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"]