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 aa79d22 commit c82c0abCopy full SHA for c82c0ab
website/Dockerfile
@@ -1,14 +1,20 @@
1
-FROM node:18-alpine
2
-
+# ==== CONFIGURE =====
+# Use a Node 16 base image
3
+FROM node:16-alpine
4
+# Set the working directory to /app inside the container
5
WORKDIR /app
-COPY package.json .
6
7
-RUN npm install
8
-RUN npm run build
9
+# Copy app files
10
COPY . .
11
12
-EXPOSE 4000
+# Download build dependency
+RUN npm install react-scripts
13
14
-CMD ["node", "app.js"]
+# Build the app
+RUN npm run build
+# ==== RUN =======
15
+# Set the env to "production"
16
+ENV NODE_ENV production
17
+# Expose the port on which the app will be running (3000 is the default that `serve` uses)
18
+EXPOSE 3000
19
+# Start the app
20
+CMD [ "npx", "serve", "build" ]
0 commit comments