1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-24 15:29:36 +02:00
AdventureLog/frontend/Dockerfile

36 lines
827 B
Text
Raw Normal View History

# Use this image as the platform to build the app
FROM node:22-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
WORKDIR /app
# Copy all local files into the image
COPY . .
2024-07-08 11:44:39 -04:00
# Remove the development .env file if present
RUN rm -f .env
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
# Build SvelteKit app
2024-07-08 11:44:39 -04:00
RUN pnpm run build
2024-03-30 21:41:49 +00:00
# Expose the port that the app is listening on
EXPOSE 3000
2024-07-08 11:44:39 -04:00
# Run the app
RUN chmod +x ./startup.sh
# The USER instruction sets the user name to use as the default user for the remainder of the current stage
USER node:node
# Run startup.sh instead of the default command
CMD ["./startup.sh"]