Skip to content

Commit

Permalink
Merge pull request #176 from egovernments/mf-nabeel
Browse files Browse the repository at this point in the history
Mf nabeel
  • Loading branch information
nabeelmd-eGov authored Feb 28, 2024
2 parents 089ab78 + d71567f commit 940f45b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
30 changes: 30 additions & 0 deletions micro-ui/web/packages/pgr/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Use Node.js base image with version 16
FROM node:16 AS build

# Set working directory
WORKDIR /app

# Copy package.json and yarn.lock (if exists)
COPY package.json ./

# clear cache
RUN yarn cache clean

# Install dependencies
RUN yarn install

# Copy the rest of the application
COPY . .

# Build the React app with Webpack
RUN yarn build

FROM nginx:mainline-alpine

ENV WORK_DIR=/var/web/pgr-ui

RUN mkdir -p ${WORK_DIR}


COPY --from=build /app/dist ${WORK_DIR}/
COPY --from=build /app/docker/nginx.conf /etc/nginx/conf.d/default.conf
12 changes: 12 additions & 0 deletions micro-ui/web/packages/pgr/docker/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
server
{
listen 80;
underscores_in_headers on;

location /pgr-ui
{
root /var/web;
index index.html index.htm;
try_files $uri $uri/ /pgr-ui/index.html;
}
}

0 comments on commit 940f45b

Please sign in to comment.