-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* duplicatedthe core module * removed the topbar and sidebar component * added the ui module * removed the css * added css in index.html file to remove the topbar and sidebbar space * added the core module * changed the package name to ui * Update lerna.json * Update package.json * Update index.js * Create mfe-ui-docker.yml --------- Co-authored-by: Jagankumar <[email protected]>
- Loading branch information
1 parent
2aac594
commit a9d8728
Showing
84 changed files
with
6,717 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: ui service docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "develop-mfe","develop-mfe-microplan-common-pkgs","develop-mfe-campaign-microplan","build-fix-develop-mfe-campaign-microplan" ] | ||
pull_request: | ||
branches: [ "develop-mfe","develop-mfe-microplan-common-pkgs","develop-mfe-campaign-microplan","build-fix-develop-mfe-campaign-microplan" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Fetch all history for tags and branches | ||
|
||
- name: Set up environment variables | ||
id: env | ||
run: | | ||
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | ||
echo "ACTION_NUMBER=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV | ||
echo "COMMIT_ID=${GITHUB_SHA: -8}" >> $GITHUB_ENV # Extract last 8 characters of SHA | ||
- name: Build the Docker image | ||
id: docker_build | ||
working-directory: ./micro-ui/web/packages/core | ||
run: | | ||
IMAGE_TAG=egovio/ui:${{ env.BRANCH_NAME }}-${{ env.COMMIT_ID }}-${{ env.ACTION_NUMBER }} | ||
docker build . \ | ||
--file docker/Dockerfile \ | ||
--tag $IMAGE_TAG | ||
echo "::set-output name=image_name::$IMAGE_TAG" | ||
- name: Login to Docker Hub and Push Docker Image | ||
working-directory: ./micro-ui/web/packages/core | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
IMAGE_NAME: ${{ steps.docker_build.outputs.image_name }} | ||
run: | | ||
# Authenticate with Docker Hub | ||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
# Push the image to Docker Hub | ||
docker push $IMAGE_NAME | ||
echo "Docker image pushed: $IMAGE_NAME" |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env","@babel/preset-react" | ||
], | ||
"plugins": ["react-html-attrs"] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Snowpack dependency directory (https://snowpack.dev/) | ||
web_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
dist/ | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# Serverless directories | ||
.serverless/ |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 design-egov | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
# core |
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Use Node.js base image with version 16 | ||
FROM node:16 AS build | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
||
# Set build arguments | ||
ARG BRANCH_NAME | ||
ARG ACTION_NUMBER | ||
ARG COMMIT_ID | ||
|
||
# Set environment variables based on build arguments | ||
ENV BRANCH_NAME=$BRANCH_NAME | ||
ENV ACTION_NUMBER=$ACTION_NUMBER | ||
ENV COMMIT_ID=$COMMIT_ID | ||
|
||
# Copy package.json and yarn.lock (if exists) | ||
COPY package.json ./ | ||
|
||
RUN rm -rf node_modules/ | ||
|
||
RUN rm -rf yarn.lock | ||
|
||
# clear cache | ||
RUN yarn cache clean | ||
|
||
# Install dependencies | ||
RUN yarn install | ||
|
||
# Optionally, you can add a label with the commit ID | ||
LABEL commit_id=$COMMIT_ID | ||
|
||
# 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/ui-core-mfe | ||
|
||
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 |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
server | ||
{ | ||
listen 80; | ||
underscores_in_headers on; | ||
|
||
location /ui-core-mfe | ||
{ | ||
root /var/web; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /ui-core-mfe/index.html; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"name": "ui", | ||
"version": "1.0.2", | ||
"description": "", | ||
"main": "index.js", | ||
"private": true, | ||
"scripts": { | ||
"start": "webpack serve --config webpack.dev.js", | ||
"build": "webpack --config webpack.prod.js", | ||
"build:dev": "webpack --config webpack.dev.js", | ||
"predeploy": "yarn build", | ||
"deploy": "gh-pages -d dist" | ||
}, | ||
"homepage": "http://design-egov.github.io/core", | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@babel/core": "7.12.10", | ||
"@babel/preset-env": "7.23.9", | ||
"@babel/preset-react": "7.12.10", | ||
"autoprefixer": "^10.4.13", | ||
"babel-loader": "8.2.2", | ||
"babel-plugin-react-html-attrs": "^3.0.5", | ||
|
||
|
||
"react-query-devtools": "^2.6.3", | ||
"regex-escape": "^3.4.10", | ||
|
||
|
||
"webpack": "^5.75.0", | ||
"webpack-cli": "^5.0.1", | ||
"webpack-dev-server": "^4.11.1", | ||
"webpack-merge": "5.7.3" | ||
}, | ||
"dependencies": { | ||
"@digit-ui/digit-ui-components": "1.0.3", | ||
"@digit-ui/digit-ui-libraries-mfe": "1.0.17", | ||
"@digit-ui/digit-ui-react-components": "1.0.1", | ||
|
||
"@rjsf/core": "5.10.0", | ||
"@rjsf/utils": "5.10.0", | ||
"@rjsf/validator-ajv8": "5.10.0", | ||
|
||
"i18next": "19.9.2", | ||
"i18next-browser-languagedetector": "^7.2.1", | ||
"i18next-http-backend": "^2.5.1", | ||
"i18next-react-postprocessor": "3.0.7", | ||
"lodash.merge": "^4.6.2", | ||
"pdfmake": "0.1.72", | ||
"react": "17.0.2", | ||
"react-dom": "17.0.2", | ||
"react-i18next": "11.16.2", | ||
"react-query": "3.6.1", | ||
"react-redux": "7.2.8", | ||
"react-router-dom": "5.3.0", | ||
"react-tooltip": "^5.21.1", | ||
"redux": "4.1.2", | ||
"redux-thunk": "^2.4.2", | ||
"rxjs": "6.6.3", | ||
"single-spa": "^5.9.3", | ||
"single-spa-react": "^4.6.1" | ||
} | ||
} |
Oops, something went wrong.