diff --git a/ui/README.md b/ui/README.md index ba41a285f..92f2905b5 100644 --- a/ui/README.md +++ b/ui/README.md @@ -107,3 +107,55 @@ This: Then you'll run it with `hamilton ui` after installing `sf-hamilton[ui]`. Note to talk to it you'll need the hamilton_sdk pacakge which can be installed with `pip install sf-hamilton[sdk]`. + + +## Building docker +### Dev mode +For development you'll want to run + +```bash +cd hamilton/ui +./dev.sh --build # to build it all +./dev.sh # to pull docker images but use local code +``` +### You need 9GB assigned to Docker or more to build the frontend +The frontend build requires around 8GB of memory to be assigned to docker to build. +If you run into this, bump your docker memory allocation up to 9GB or more. + + +### Prod mode +For production build you'll want to run + +```bash +cd hamilton/ui +./run.sh # to pull from docker and run +./run.sh --build # to rebuild images for prod + +``` +#### Caveats: +You'll want to clean the `backend/dist/` directory to not add unnecessary files to the docker image. + + +### Pushing +How to push to docker hub: +```bash +# retag if needed +docker tag local-image:tagname dagworks/ui-backend:VERSION +# push built image +docker push dagworks/ui-backend:VERSION +# retag as latest +docker tag dagworks/ui-backend:VERSION dagworks/ui-backend:latest +# push latest +docker push dagworks/ui-backend:latest +``` + +```bash +# retag if needed +docker tag local-image:tagname dagworks/ui-frontend:VERSION +# push built image +docker push dagworks/ui-frontend:VERSION +# retag as latest +docker tag dagworks/ui-backend:VERSION dagworks/ui-backend:latest +# push latest +docker push dagworks/ui-backend:latest +``` diff --git a/ui/frontend/README.md b/ui/frontend/README.md index a680d094e..c6d96405d 100644 --- a/ui/frontend/README.md +++ b/ui/frontend/README.md @@ -10,55 +10,3 @@ To generate the code for the typescript backend client, run : `npx @rtk-query/codegen-openapi openapi-config.json` from the `frontend` directory, while the backend is running on localhost:8000. - - -## Building docker -## Dev mode -For development you'll want to run - -```bash -cd hamilton/ui -./dev.sh --build # to build it all -./dev.sh # to pull docker images but use local code -``` -## You need 9GB assigned to Docker or more to build the frontend -The frontend build requires around 8GB of memory to be assigned to docker to build. -If you run into this, bump your docker memory allocation up to 9GB or more. - - -## Prod mode -For production build you'll want to run - -```bash -cd hamilton/ui -./run.sh # to pull from docker and run -./run.sh --build # to rebuild images for prod - -``` -### Caveats: -You'll want to clean the `backend/dist/` directory to not add unnecessary files to the docker image. - - -## Pushing -How to push to docker hub: -```bash -# retag if needed -docker tag local-image:tagname dagworks/ui-backend:VERSION -# push built image -docker push dagworks/ui-backend:VERSION -# retag as latest -docker tag dagworks/ui-backend:VERSION dagworks/ui-backend:latest -# push latest -docker push dagworks/ui-backend:latest -``` - -```bash -# retag if needed -docker tag local-image:tagname dagworks/ui-frontend:VERSION -# push built image -docker push dagworks/ui-frontend:VERSION -# retag as latest -docker tag dagworks/ui-backend:VERSION dagworks/ui-backend:latest -# push latest -docker push dagworks/ui-backend:latest -```