We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9b6b7c commit ef4c7f6Copy full SHA for ef4c7f6
.dockerignore
@@ -0,0 +1,3 @@
1
+// .dockerignore
2
+node_modules
3
+build
Dockerfile
@@ -0,0 +1,19 @@
+# ==== CONFIGURE =====
+# Use a Node 16 base image
+FROM node:16-alpine
4
+# Set the working directory to /app inside the container
5
+WORKDIR /app
6
+# Copy app files
7
+COPY . .
8
+# ==== BUILD =====
9
+# Install dependencies (npm ci makes sure the exact versions in the lockfile gets installed)
10
+RUN npm ci
11
+# Build the app
12
+RUN npm run build
13
+# ==== RUN =======
14
+# Set the env to "production"
15
+ENV NODE_ENV production
16
+# Expose the port on which the app will be running (3000 is the default that `serve` uses)
17
+EXPOSE 3000
18
+# Start the app
19
+CMD [ "npx", "serve", "build" ]
0 commit comments