Files
dealplustech/dealplustech-astro/Dockerfile
Kunthawat Greethong b8e372ca96 fix: Add .dockerignore to exclude Next.js root from Astro build
- Ignore root package.json and Next.js files
- Prevents npm from finding wrong project
- Ensures only Astro code is built

Fixes build error where Next.js code was being compiled.
2026-03-03 10:17:47 +07:00

23 lines
393 B
Docker

# Astro Production Dockerfile
FROM node:20-alpine
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci --omit=dev
# Copy all source code
COPY . .
# Build Astro project (includes public folder in dist)
RUN npm run build
# Expose port
EXPOSE 4321
# Start Astro preview server
CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0", "--port", "4321"]