Skip to content

Commit

Permalink
chore: changed httpServer
Browse files Browse the repository at this point in the history
  • Loading branch information
froid1911 committed Apr 9, 2024
1 parent 16f3d1d commit 8eda41e
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions Dockerfile
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}

0 comments on commit 8eda41e

Please sign in to comment.