2024-03-30 21:39:38 +00:00
|
|
|
# Use this image as the platform to build the app
|
|
|
|
FROM node:18-alpine AS external-website
|
|
|
|
|
|
|
|
# A small line inside the image to show who made it
|
|
|
|
LABEL Developers="Sean Morley"
|
|
|
|
|
|
|
|
# The WORKDIR instruction sets the working directory for everything that will happen next
|
2024-03-30 21:30:22 +00:00
|
|
|
WORKDIR /app
|
2024-03-30 21:39:38 +00:00
|
|
|
|
|
|
|
# Copy all local files into the image
|
2024-03-30 21:30:22 +00:00
|
|
|
COPY . .
|
2024-03-30 21:39:38 +00:00
|
|
|
|
2024-05-25 14:30:33 +00:00
|
|
|
# Install pnpm
|
|
|
|
RUN npm install -g pnpm
|
|
|
|
|
|
|
|
# Clean install all node modules using pnpm
|
|
|
|
RUN pnpm install
|
2024-03-30 21:39:38 +00:00
|
|
|
|
|
|
|
# Build SvelteKit app
|
2024-03-30 21:30:22 +00:00
|
|
|
RUN npm run build
|
|
|
|
|
2024-03-30 21:41:49 +00:00
|
|
|
# Expose the port that the app is listening on
|
|
|
|
EXPOSE 3000
|
|
|
|
|
2024-04-02 14:41:07 +00:00
|
|
|
RUN chmod +x ./startup.sh
|
|
|
|
|
2024-03-30 21:39:38 +00:00
|
|
|
# The USER instruction sets the user name to use as the default user for the remainder of the current stage
|
|
|
|
USER node:node
|
|
|
|
|
2024-04-02 14:41:07 +00:00
|
|
|
# Run startup.sh instead of the default command
|
2024-05-25 14:30:33 +00:00
|
|
|
CMD ["./startup.sh"]
|