Heavyweight(FastAPI)

2 years ago

Description: FastAPI Template for Large Projects

Category: Starters

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

Solved

19 Replies

2 years ago

Hello everyone,

Any improvements/fixes you want?


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_VERSION is irrelevant and can be removed
  • You should be setting an environment variable PYTHONUNBUFFERED to 1 in your Dockerfile

2 years ago

Noted I will work on them immediately


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 PYTHONUNBUFFERED to 1 in 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

ah great thank you for that


2 years ago

is there any useful Python template i can make?


2 years ago

A template for embedchain has been requested.


2 years ago

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


2 years ago

I'll leave that up to you!


2 years ago

okay xD


victor-rayan
HOBBY

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.


2 years ago

Alright


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


2 years ago

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


Status changed to Awaiting User Response Railway almost 2 years ago


Railway
BOT

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


Welcome!

Sign in to your Railway account to join the conversation.

Loading...