forked from acaldas/document-model-electron
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,10 @@ | ||
FROM node:lts-alpine AS builder | ||
ARG BASE_PATH="/alpha/powerhouse/connect" | ||
ENV BASE_PATH=${BASE_PATH} | ||
|
||
WORKDIR /opt/app | ||
COPY . . | ||
RUN npm install -g husky vite | ||
RUN npm install --frozen-lockfile | ||
RUN npm run build:web -- --base ${BASE_PATH} | ||
|
||
# Production image, copy all the files and run next | ||
FROM nginx:latest AS runner | ||
FROM node:lts-alpine | ||
|
||
ARG X_TAG | ||
WORKDIR /opt/app | ||
ENV NODE_ENV=production | ||
ARG BASE_PATH="/alpha/powerhouse/connect" | ||
COPY . . | ||
RUN npm install --frozen-lockfile | ||
ENV BASE_PATH=${BASE_PATH} | ||
COPY --from=builder /opt/app/dist /usr/share/nginx/html | ||
|
||
COPY nginx.conf /etc/nginx/conf.d/default.conf.template | ||
CMD /bin/sh -c "envsubst '\$PORT,\$BASE_PATH' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf" && nginx -g 'daemon off;' | ||
CMD npm run dev:web -- --host 0.0.0.0 --port ${PORT} --basename ${BASE_PATH} |