Files
latosa-escrima/frontend/Dockerfile.old
2025-01-18 21:13:03 +01:00

26 lines
491 B
Docker

# Use Deno image
FROM node
# Set working directory
WORKDIR /app
# Copy project files
COPY . .
ENV NODE_PATH=.
ENV NODE_ENV=production
RUN npm install
# Install Next.js dependencies
RUN npm run build
# Move everything to the standalone
RUN cp -r public .next/standalone/public
RUN cp -r .next/static .next/standalone/.next/static
RUN mv .next/standalone/server.js .next/standalone/server.cjs
RUN rm -r ./node_modules
# Start the Next.js app
CMD ["node", ".next/standalone/server.cjs"]