2 years ago
Description: FastAPI Template for Large Projects
Category: Starters
19 Replies
2 years ago
Well since you asked -
- Use template variable functions for stuff like
SECRET_KEY-${{secret(59)}} - Give the service a better name -
heavyweight-fastapi->Heavyweight - Give the template a better name -
Heavyweight(FastAPI)->Heavyweight - FastAPI - The service does not have service variables for any of the database variables, use reference variables
- You use a Dockerfile,
NIXPACKS_PYTHON_VERSIONis irrelevant and can be removed - You should be setting an environment variable
PYTHONUNBUFFEREDto1in your Dockerfile
2 years ago
i have pushed the changes, can you confirm everything is okay.
NOTE: when i tried to deploy the template for a test it was still showing me some old env variables that i removed although i noticed the SECRET_KEY edit works
2 years ago
Could just be the browser cache, you can try a hard refresh.
Unfinished / additional feedback -
- Add a health check
- You should be using the private database URL
- You should be setting an environment variable
PYTHONUNBUFFEREDto1in your Dockerfile
2 years ago
- Healthcheck already there (.toml setup)
- I switched to database private url [tho can you tell me why]
- Added, i forgot about the PYTHONUNBUFFERED earlier
2 years ago
>I switched to database private url [tho can you tell me why]
Using the public database url subjects you (since I assume you run this template yourself too) and the template users to avoidable egress fees, the private network does not charge for egress.
2 years ago
Thanks for sharing! nice template and Dockerfile - just what I was looking for!
2 years ago
Thanks @victor-rayan, i am always open to feedback and suggestions if you have any
2 years ago
Hey, Looks like this template is failing to deploy, please look into this if possible.
Status changed to Awaiting Railway Response Railway • almost 2 years ago
2 years ago
I fixed the issue, thank you for the notice.
It seemed like Postgres private db url was renamed to DATABASE_URL and that caused the issue
Status changed to Awaiting Railway Response Railway • almost 2 years ago
Status changed to Awaiting User Response Railway • almost 2 years ago
9 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 10 months ago