Add a docker image.
This commit is contained in:
parent
990c0e4b57
commit
66eb8e0cc2
|
|
@ -0,0 +1,25 @@
|
||||||
|
FROM node:20-alpine
|
||||||
|
|
||||||
|
# Enable pnpm
|
||||||
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy files
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
# Build the SvelteKit app
|
||||||
|
RUN pnpm run build
|
||||||
|
|
||||||
|
# Expose default port
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
# Set environment
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
|
# Start the SvelteKit app
|
||||||
|
CMD ["node", "build"]
|
||||||
Loading…
Reference in New Issue