First cut
This commit is contained in:
26
server/Dockerfile
Normal file
26
server/Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
FROM node:22-alpine AS base
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install deps (build from repo root so shared/ resolves)
|
||||
COPY package.json package-lock.json* ./
|
||||
COPY shared/package.json shared/
|
||||
COPY server/package.json server/
|
||||
RUN npm install --ignore-scripts
|
||||
|
||||
# Rebuild native modules (better-sqlite3)
|
||||
RUN npm rebuild better-sqlite3
|
||||
|
||||
# Copy source
|
||||
COPY shared ./shared
|
||||
COPY server ./server
|
||||
COPY site-context.json ./
|
||||
COPY content ./content
|
||||
COPY config ./config
|
||||
|
||||
WORKDIR /app/server
|
||||
|
||||
ENV NODE_ENV=production
|
||||
EXPOSE 3001
|
||||
|
||||
CMD ["npx", "tsx", "src/index.ts"]
|
||||
Reference in New Issue
Block a user