Add Dockerfile for Easypanel deployment

This commit is contained in:
Kunthawat Greethong
2026-03-13 07:30:44 +07:00
parent 318a96ad56
commit 58890b0230

15
Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY --from=builder /app/dist ./dist
RUN apk add --no-cache sqlite-libs
EXPOSE 80
ENV NODE_ENV=production HOST=0.0.0.0 PORT=80
CMD ["npx", "astro", "preview", "--host", "0.0.0.0", "--port", "80"]