2024-05-13 23:34:06 -04:00
|
|
|
FROM node:lts AS runtime
|
|
|
|
WORKDIR /app
|
|
|
|
|
2024-05-15 12:09:16 -04:00
|
|
|
# Copy site to Docker image
|
2024-05-13 23:34:06 -04:00
|
|
|
COPY . .
|
|
|
|
|
2024-05-15 12:09:16 -04:00
|
|
|
# Install packages
|
2024-05-13 23:34:06 -04:00
|
|
|
RUN npm install
|
|
|
|
RUN npm run build
|
|
|
|
|
2024-05-15 12:09:16 -04:00
|
|
|
# Set website host and port
|
2024-05-13 23:34:06 -04:00
|
|
|
ENV HOST=0.0.0.0
|
|
|
|
ENV PORT=4321
|
2024-05-15 12:09:16 -04:00
|
|
|
|
|
|
|
# Disable Keystatic
|
|
|
|
ENV SKIP_KEYSTATIC=true
|
|
|
|
|
|
|
|
# Expose Port
|
2024-05-13 23:34:06 -04:00
|
|
|
EXPOSE 4321
|
2024-05-15 12:09:16 -04:00
|
|
|
|
|
|
|
# Run
|
2024-05-13 23:34:06 -04:00
|
|
|
CMD node ./dist/server/entry.mjs
|