Spaces:
Running
Running
build command
Browse files- Dockerfile +7 -19
Dockerfile
CHANGED
|
@@ -1,26 +1,14 @@
|
|
| 1 |
-
# Dockerfile
|
| 2 |
|
| 3 |
-
|
| 4 |
-
FROM node:18
|
| 5 |
-
USER 1000
|
| 6 |
|
| 7 |
-
|
| 8 |
-
WORKDIR /usr/src/app
|
| 9 |
|
| 10 |
-
|
| 11 |
-
COPY
|
|
|
|
| 12 |
|
| 13 |
-
|
| 14 |
-
RUN
|
| 15 |
|
| 16 |
-
# Copy the rest of the application files to the container
|
| 17 |
-
COPY --chown=1000 . .
|
| 18 |
-
|
| 19 |
-
# Build the Svelte Kit application for production
|
| 20 |
-
RUN npm run build
|
| 21 |
-
|
| 22 |
-
# Expose the application port (assuming your app runs on port 3000)
|
| 23 |
EXPOSE 3000
|
| 24 |
-
|
| 25 |
-
# Run the application in production mode
|
| 26 |
CMD ["node", "build"]
|
|
|
|
|
|
|
| 1 |
|
| 2 |
+
FROM node:16-alpine
|
|
|
|
|
|
|
| 3 |
|
| 4 |
+
RUN npm install -g pnpm
|
|
|
|
| 5 |
|
| 6 |
+
WORKDIR /app
|
| 7 |
+
COPY package.json pnpm-lock.yaml ./
|
| 8 |
+
RUN pnpm install --frozen-lockfile
|
| 9 |
|
| 10 |
+
COPY . .
|
| 11 |
+
RUN pnpm build
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
EXPOSE 3000
|
|
|
|
|
|
|
| 14 |
CMD ["node", "build"]
|