Heavyweight(FastAPI)

a year ago

Description: FastAPI Template for Large Projects

Category: Starters

URL: https://railway.app/template/XJzuMz

Awaiting User Response

19 Replies

a year ago

Hello everyone,
Any improvements/fixes you want?


a year 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_VERSION is irrelevant and can be removed

  • You should be setting an environment variable PYTHONUNBUFFERED to 1 in your Dockerfile


a year ago

Noted I will work on them immediately


a year 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


a year 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 PYTHONUNBUFFERED to 1 in your Dockerfile


a year 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


a year 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.


a year ago

ah great thank you for that


a year ago

is there any useful Python template i can make?


a year ago

A template for embedchain has been requested.


a year ago

alright, should i do it with like a UI or pure API or CLI


a year ago

I'll leave that up to you!


a year ago

okay xD


victor-rayanHOBBY

a year ago

Thanks for sharing! nice template and Dockerfile - just what I was looking for!


a year ago

Thanks @victor-rayan, i am always open to feedback and suggestions if you have any


9 months ago

Hey, Looks like this template is failing to deploy, please look into this if possible.


9 months ago

Alright


Status changed to Awaiting Railway Response railway[bot] 9 months ago


9 months 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[bot] 9 months ago


9 months ago

Indeed it was, thank you for your prompt response! much appreciated.


Status changed to Awaiting User Response railway[bot] 9 months ago


Heavyweight(FastAPI) - Railway Help Station