Skip to content
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

Dockerize feathr web ui app #245

Merged
merged 2 commits into from
May 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ui/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
node_modules
15 changes: 15 additions & 0 deletions ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:16-alpine as ui-build
WORKDIR /usr/src
COPY . .
RUN npm install && npm run build

FROM nginx:alpine

## Remove default nginx index page
RUN rm -rf /usr/share/nginx/html/*

# Copy production bundle from stage 1
COPY --from=ui-build /usr/src/build/ /usr/share/nginx/html

ENTRYPOINT ["nginx", "-g", "daemon off;"]

5 changes: 3 additions & 2 deletions ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This is Feathr web ui frontend code

## Prerequisites
Install the latest version of [NodeJS](https://nodejs.org/en/) LTS v14.x or v16.x. Make sure to use npm no later than 6.x. Run **node --version** and **npm --version** to verify installed versions.
Install the latest version of [NodeJS](https://nodejs.org/en/) LTS v14.x or v16.x. Make sure to use npm no later than 6.x. Run `node --version` and `npm --version` to verify installed versions.

## Build and run locally

Expand All @@ -21,7 +21,8 @@ This should launch [http://localhost:3000/](http://localhost:3000/) on your web

## Deploying

For deployment, run `npm run build` and upload `build/` to your server. Docker image based deployment is coming soon.
- For static file based deployment, run `npm run build` and upload `build/` to your server.
- For docker image based deployment, run `docker -t <image_name> .` to build image and push to your container registry.

## Lint

Expand Down