-
Notifications
You must be signed in to change notification settings - Fork 5
Update GIG Client to migrate it from azure to Choreo #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vish-mv
wants to merge
10
commits into
LSFLK:master
Choose a base branch
from
vish-mv:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e829300
Update Dcker file and nginx according to choreo
vish-mv 5cad65b
Updade package and docker file ro resolve module issues
vish-mv 33e6e56
Update dockerfile and packge to resolve build failures
vish-mv bec7ac5
Update package
vish-mv cb9993a
Update Dockerfile with server URL
vish-mv 10ad085
Update Dockerfile
vish-mv 628d67b
Update Dockerfile
vish-mv 4931e47
Update Dockerfile with server url
vish-mv f10faff
Remove server URL from the dockerfile
vish-mv 3edabdc
Update configs
vish-mv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,23 +1,39 @@ | ||
| # build environment | ||
| FROM node:14.17.5-alpine as build | ||
| FROM node:14.19.0-alpine3.15 as build | ||
| WORKDIR /app | ||
| ENV PATH /app/node_modules/.bin:$PATH | ||
| COPY package.json /app/package.json | ||
| RUN apk add --no-cache git | ||
| RUN npm install --production | ||
| COPY . /app | ||
| RUN apk update && apk upgrade && \ | ||
| apk add --no-cache bash git openssh | ||
|
|
||
| # set baseurl to get connected with backend API | ||
| ARG SERVER_URL=http://localhost:9000/ | ||
| # Install dependencies with legacy peer deps | ||
| RUN npm install --silent --legacy-peer-deps | ||
|
|
||
| ENV REACT_APP_SERVER_URL=$SERVER_URL | ||
| COPY . /app | ||
|
|
||
| RUN npm run build --if-present | ||
|
|
||
| # host environment | ||
| FROM nginx:1.16.0-alpine | ||
| FROM nginx:1.25.1-alpine | ||
|
|
||
| # Update and upgrade Alpine packages | ||
| RUN apk update && apk upgrade | ||
|
|
||
| COPY --from=build /app/build /usr/share/nginx/html | ||
| RUN rm /etc/nginx/conf.d/default.conf | ||
| COPY nginx/nginx.conf /etc/nginx/conf.d | ||
| EXPOSE 80 | ||
| COPY nginx/nginx.conf /etc/nginx/nginx.conf | ||
|
|
||
| # Create necessary directories and set permissions | ||
| RUN mkdir -p /tmp/nginx /var/cache/nginx /var/run /var/log/nginx && \ | ||
| chown -R 10014:10014 /tmp/nginx /var/cache/nginx /var/run /var/log/nginx /usr/share/nginx/html && \ | ||
| chmod -R 755 /tmp/nginx /var/cache/nginx /var/run /var/log/nginx /usr/share/nginx/html | ||
|
|
||
| # Create a non-root user | ||
| RUN adduser -D -u 10014 choreouser | ||
|
|
||
| # Switch to the non-root user | ||
| USER 10014 | ||
|
|
||
| EXPOSE 8080 | ||
|
|
||
| CMD ["nginx", "-g", "daemon off;"] | ||
This file contains hidden or 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,17 +1,37 @@ | ||
| server { | ||
| worker_processes auto; | ||
| error_log /dev/stdout info; | ||
| pid /tmp/nginx.pid; | ||
|
|
||
| listen 80; | ||
| events { | ||
| worker_connections 1024; | ||
| } | ||
|
|
||
| location / { | ||
| root /usr/share/nginx/html; | ||
| index index.html index.htm; | ||
| try_files $uri $uri/ /index.html; | ||
| } | ||
| http { | ||
| include /etc/nginx/mime.types; | ||
| default_type application/octet-stream; | ||
|
|
||
| error_page 500 502 503 504 /50x.html; | ||
| access_log /dev/stdout; | ||
| server_tokens off; | ||
|
|
||
| location = /50x.html { | ||
| root /usr/share/nginx/html; | ||
| } | ||
| client_body_temp_path /tmp/client_temp; | ||
| proxy_temp_path /tmp/proxy_temp_path; | ||
| fastcgi_temp_path /tmp/fastcgi_temp; | ||
| uwsgi_temp_path /tmp/uwsgi_temp; | ||
| scgi_temp_path /tmp/scgi_temp; | ||
|
|
||
| server { | ||
| listen 8080; | ||
|
|
||
| location / { | ||
| root /usr/share/nginx/html; | ||
| index index.html index.htm; | ||
| try_files $uri $uri/ /index.html; | ||
| } | ||
|
|
||
| error_page 500 502 503 504 /50x.html; | ||
|
|
||
| location = /50x.html { | ||
| root /usr/share/nginx/html; | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,5 +1,7 @@ | ||
| const {createProxyMiddleware} = require('http-proxy-middleware'); | ||
| const API_URL = window?.configs?.serviceURL ? window.configs.serviceURL : "/"; | ||
|
|
||
|
|
||
| module.exports = function (app) { | ||
| app.use(createProxyMiddleware('/images', {target: process.env.REACT_APP_SERVER_URL, changeOrigin: true})); | ||
| app.use(createProxyMiddleware('/images', {target: API_URL, changeOrigin: true})); | ||
| }; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's confirm the port that support scale to zero