Comments (4)
Recently I came across Zeit and was impressed by its integration of services towards the serverless. I am trying to develop the Zeit builders for this full-stack. I think this is the best approach for those who just want to devote themselves to developing their own application.
from full-stack-fastapi-couchbase.
Hi @valentierra ! Sorry for the delay.
I guess that using those tools/services you probably wouldn't use/need containers. The drawback might be the vendor locking I guess.
Frontend on Netlify
You can have your frontend built on Netlify building servers directly. Or if you want to do it in Docker, you can push the built code as part of the build process.
In Netlify you would get a somecustomdomain.netlify.com
. You can set a DNS record (a CNAME
) to point somecustomdomain.com
to somecustomdomain.netlify.com
. That way, whenever someone goes to somecustomdomain.com
, they will see your content served from Netlify.
Frontend CORS
Then you just have to add that domain to your CORS in your backend (in the backend.env
file if you use a recent version of this stack).
And that's it, it doesn't matter that your frontend is actually served by Netlify, as long as your backend has the host (https://somecustomdomain.com
) in its configuration of CORS.
Backend in AWS/GCP
AWS and GCP can provide you virtual machine instances. Those are just standard Linux instances. You normally have sudo
in those machines. And normally, each instance gets a fixed public IP for as long as it exists.
If you plan on removing them and changing them and you want to keep a fixed IP, you can add "floating IPs" (each one has its name for them) and then redirect them to your VM.
Backend in PaaS, Heroku, Google App Engine, etc
If you use one of the "platform as a service" systems, where you don't have control of an actual Linux instance behind, but you just provide your code to some system and it runs it, you are, more or less, in their hands. Some people like it some don't. Setting up IPs, ports, domains, HTTPS, all that is done through their custom private systems.
In that case, you would probably also use one of their "database as a service", like Heroku's Postgres, AWS and Google Cloud have their own versions and also several custom "NoSQL" versions. You would probably not use Couchbase in that scenario. But you would have to adapt your code to use those databases.
Less things to worry yourself (they handle the DB) in exchange of more vendor locking and price fee.
Backend in Function as a service
If you want to use one of the Function as a service (also called "serverless") systems, you might want to try https://github.com/erm/mangum, with it, you can put FastAPI in one of these services.
This gives even more responsibility to the service provider.
from full-stack-fastapi-couchbase.
Thank you @tiangolo!
Impeccable answer! Your feedback is much appreciated!
I am closing the issue but keep posting if I find something with the merit to add/comment.
Cheers!
from full-stack-fastapi-couchbase.
Awesome, thanks!
from full-stack-fastapi-couchbase.
Related Issues (16)
- Bad gateway error installing on macOs Mojave with Docker for Mac HOT 13
- Hide endpoint in interactive documentation HOT 8
- WORKER TIMEOUT +502 Bad gateway HOT 2
- Best practice for securing passwords on public repository? HOT 4
- On domain change frontend/.env and others don't use DOMAIN environmental variable HOT 4
- Minimum swarm requirements? HOT 2
- [QUESTION] Where to load a Large pickled ML model? HOT 2
- Broken docker build HOT 6
- Unable to login using the frontend HOT 4
- Incomplete Instructions HOT 10
- Bad Gateway HOT 1
- Any plan for creating a SQL version? HOT 2
- Can't login in the forntend HOT 5
- 422 Unprocessable Entity HOT 4
- Windows development line-ending error in sync-gateway and backend HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from full-stack-fastapi-couchbase.