Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 15f23df

Browse files
committed
Adding AppMode Env
1 parent 368ec65 commit 15f23df

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

docker/Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Use the base image with Node.js
22
FROM node:latest
33

4+
ARG APPMODE
5+
ARG APPENV
6+
7+
ENV APPMODE=$APPMODE
8+
ENV APPENV=$APPENV
9+
410
# Copy the current directory into the Docker image
511
COPY . /taas-app
612

@@ -10,8 +16,6 @@ WORKDIR /taas-app
1016
# Install the dependencies from package.json
1117
RUN npm install
1218

13-
#RUN npm run dev
14-
15-
#CMD npm start
19+
RUN npm run build
1620

17-
CMD npm run dev
21+
CMD npm start

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"start": "node server.js",
55
"dev": "webpack-dev-server --port 8501 --host 0.0.0.0",
66
"dev-https": "webpack-dev-server --https --port 8501 --host 0.0.0.0",
7-
"build": "webpack --mode=production",
7+
"build": "webpack --mode=${APPMODE:-development} --env.config=${APPENV:-dev}",
88
"analyze": "webpack --mode=production --env.analyze=true",
99
"lint": "eslint src --ext js",
1010
"format": "prettier --write \"./**\"",

0 commit comments

Comments
 (0)