Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Can anyone tell me what they are hosting this setup on? #1536

Unanswered
ChrisSQL asked this question in Questions
Discussion options

First Check

  • I added a very descriptive title here.
  • I used the GitHub search to find a similar question and didn't find it.
  • I searched in the documentation/README.
  • I already searched in Google "How to do X" and didn't find any information.
  • I already read and followed all the tutorial in the docs/README and didn't find an answer.

Commit to Help

  • I commit to help with one of those options 👆

Example Code

NA

Description

Ive been developing locally for months on this stack and now that its time to deploy im having a bit of a nightmare.

Can anyone tell me where they host it and what kind of a setup you have so at least i know im heading in the right direction?

Thanks

Operating System

Linux

Operating System Details

Mac

Python Version

Python 3.9.6

Additional Context

No response

You must be logged in to vote

Replies: 5 comments 4 replies

Comment options

I'm deploying on a VPS with github workflow.

I following this documentation

On VPS server you have to :

  • configure and running traefik network container doc
  • install github runner to check it deployment WF are running doc

To not store secret on server or on .env, I prefered to add secrets in Github UI through actions variables used by https://github.com/fastapi/full-stack-fastapi-template/blob/master/.github/workflows/deploy-production.yml

You must be logged in to vote
3 replies
Comment options

It would be really great if they included an example host in the docs and visual instructions.

i ended up using Render

2 x Services and a Postgres DB

Just a matter of getting the env values correct then.

Comment options

@ChrisSQL sorry, I know it's been a while, but I'm struggling to get this deployed.

Can I ask which settings you used in Render to split out the services like that? Specifically, do you specify the Dockerfiles for each service? (ie ./backend/Dockerfile and ./frontend/Dockerfile)

... and does that require other changes from the Render settings (except maybe for environment vars etc)

thanks!

Comment options

It's not using dockerfiles at all. They are redundant when you split it out

You're looking for the front end, backend and database links from your render settings

Setup db first

Get those settings

Setup backend

Put db settings in backend and get that going

Then do frontend connecting to backend

Try setup the db and backend and let me know where you get stuck.

Comment options

BACKEND ENV VARIABLES

BACKEND_CORS_ORIGINS

https://full-stack-fastapi-template-xxxxx.onrender.com,
http://full-stack-fastapi-template-xxxxx.onrender.com,
http://localhost:3000,
https://localhost:3000,
http://localhost:3001,
https://localhost:3001,

ENVIRONMENT
production

FIRST_SUPERUSER <- i believe this is from backend settings
FIRST_SUPERUSER_PASSWORD same

FRONTEND_HOST <- your website
website.com

POSTGRES_DB <- get this from db setup
POSTGRES_PASSWORD <-same
POSTGRES_PORT 5432

POSTGRES_SERVER dpg-cvp6abuuk2gs7xxxxxx-a.xxxxxx-postgres.render.com
POSTGRES_USER <- from db setup

PROJECT_NAME whatever you want

SECRET_KEY <- your secret key from .env file i think. Dont think this is even used but i have it

You must be logged in to vote
0 replies
Comment options

DB will have no Env Variables

You must be logged in to vote
0 replies
Comment options

FRONTEND

youll use the Url of the backend

something like

https://full-stack-fastapi-template-1-xxxxxx.onrender.com

You must be logged in to vote
0 replies
Comment options

thanks a million Chris, that will help me so much! One final question: Have you split the backend and front end into different Github repositories, or can you keep everything in the same repo?
You must be logged in to vote
1 reply
Comment options

I actually replaced the frontend with a NextJS boilerplate.

Either way same idea.

I did split but you dont have to. You can just set the folder on each of the settings frontend,backend.... and it picks it up when you deploy

Now im thinking with copilot it would be better to have them in same repo so you can bring things into context? works either way though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested

AltStyle によって変換されたページ (->オリジナル) /