-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Frontend + Backend Integrated Deployment (K8s only) #45
Conversation
package frontend + config into new nginx-based image
chart: support '--set backend_only=1' and '--set frontend_only=1' to only force deploy one or the other remove unused files, openapi env var backend: set --root-path to /api in uvicorn
Created #46 for frontend prod build settings |
FROM nginx | ||
|
||
COPY ./index.html /usr/share/nginx/html | ||
COPY ./dist/main.js /usr/share/nginx/html |
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.
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.
Looks good, a few comments:
- Did you manually delete
frontend/src/__generated__
? If so, what was the reason? - Per discord convo, frontend isn't running in local docker yet
Yes, oops, that was my mistake! I think I saw generated and thought it was something I added by accident, will revert.
yep, will see can fix before merging |
In support of #19, this combines the frontend + backend running on a single domain.
The backend and frontend run on separate services and can be deployed independently, though currently with the same helm chart.
The backend is then run entirely from
/api
endpoint, eg./api/docs
Contains:
/api
prefix/api
prefix.--set frontend_only=1
and--set backend_only=1
helm chart settings to redeploy only one or the other.Questions/TODO:
main.js
andindex.html
, although there's a bunch of other chunks that are build. Probably need to set up a production build of the frontend to make this more robust? @SuaYoo