overhaul
This commit is contained in:
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
# Stage 1: Build the Nuxt application
|
||||
FROM node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY /app/package*.json ./
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
FROM node:20-alpine AS runner
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/.output ./.output
|
||||
COPY --from=builder /app/package*.json ./
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
|
||||
# Ensure necessary environment variables are set if needed at runtime
|
||||
# Nuxt uses NUXT_ prefix for runtime environment variables
|
||||
EXPOSE 3030
|
||||
|
||||
ENV NUXT_PORT=3030
|
||||
ENV PORT=3030
|
||||
|
||||
# Command to run the application
|
||||
CMD ["node", "./.output/server/index.mjs"]
|
||||
Reference in New Issue
Block a user