moved building to Dockefile instead of entrypoint (#39)

* moved building to Dockefile instead of entrypoint

* moved enviroment variable to gloabl

* updated to use process env during build to allow use of window global var

* added new line

* updated constants for window.jambonz

* removed NODE_ENV in favor of just window.JAMBONZ

* removed unrequired and change const per pull request
This commit is contained in:
Andrew
2022-02-23 14:40:05 +02:00
committed by GitHub
parent 8f8d635bd3
commit 92db20965e
24 changed files with 151 additions and 105 deletions
+3
View File
@@ -1,8 +1,10 @@
FROM node:alpine as builder
RUN apk update && apk add --no-cache python3 make g++
COPY . /opt/app
WORKDIR /opt/app/
COPY package.json ./
RUN npm install
RUN npm run build
RUN npm prune
FROM node:alpine as webapp
@@ -10,6 +12,7 @@ RUN apk add curl
WORKDIR /opt/app
COPY . /opt/app
COPY --from=builder /opt/app/node_modules ./node_modules
COPY --from=builder /opt/app/build ./build
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]