Files
dealplustech/Dockerfile
Kunthawat Greethong ca9787d4dd fix: Use original favicons from dealplustech.co.th
- Real favicon.ico from original website (1.4KB)
- Real favicon.svg from original website (140KB)
- Real apple-touch-icon.png from original website
- Match exact original branding
2026-03-03 18:08:40 +07:00

43 lines
816 B
Docker

# Build Stage
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci
# Copy source code
COPY . .
# Build Next.js project
RUN npm run build
# Production Stage
FROM node:20-alpine
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install production dependencies only
RUN npm ci --production
# Copy built Next.js app
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
# Expose port
EXPOSE 4321
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://localhost:4321', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"
# Start Next.js server
CMD ["node", "server.js"]