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

VITE_API_URL at runtime & optional traefik #1209

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

elsampsa
Copy link

Synopsis

This version makes it easier to deploy the fullstack example into cloud services (gcp, aws, azure, etc.).

API endpoint for frontend

Earlier, the argument VITE_API_URL was used at image build time and "hardcoded" into the docker image.

Now it is updated dynamically at container run time, so that deployment (as defined by .env) becomes decoupled from the build.

One defines the API endpoint for the frontend in the .env file with FRONTEND_API_TARGET.

Optional traefik

In the cloud, one might prefer to let the cloud provider to handle ssh, load-balancing, etc. (and also use cloud provider's "native" postgresql). Using traefik or not, can now be defined in the .env file with parameter TRAEFIK:

TRAEFIK=some-value # use traefik
TRAEFIK= # do not use traefik

Thanks for the awesome repo & considering this pull request. :)

P. S. I will add this repo as a subrepo into here:

https://github.com/elsampsa/fastapi-fullstack-cloud-deploy/tree/main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant