mirror of
https://github.com/jambonz/jambonz-webapp.git
synced 2026-07-04 19:21:58 +00:00
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:
@@ -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"]
|
||||
Reference in New Issue
Block a user