tiangolo / full-stack-fastapi-template

Full stack, modern web application template. Using FastAPI, React, SQLModel, PostgreSQL, Docker, GitHub Actions, automatic HTTPS and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do I get this running on local?

openSourceBugs opened this issue · comments

I added configuration to the .env files and ran docker compose up -d
I see the login page at localhost but I also see
POST https://localhost/api/v1/login/access-token net::ERR_CONNECTION_REFUSED

I'm not sure if it has to do with the FLOWER_BASIC_AUTH= in .env

There's not much to go by in the docs. It says to not use this and use it at the same time.

"This project is currently being restructured, don't use it right now, hold for a bit.

In the next couple of weeks it will be ready. 😎 🚀"

"You can just fork or clone this repository and use it as is.

✨ It just works. ✨"

I would also like to debug in the backend at least.

Update this with your app domain

DOMAIN=localhost

DOMAIN=localhost.tiangolo.com

SERVER_HOST=http://localhost

PROJECT_NAME="FastAPI Project"

STACK_NAME=fastapi-project

Backend

BACKEND_CORS_ORIGINS="http://localhost,http://localhost:5173,https://localhost,https://localhost:5173"
SECRET_KEY=foo
FIRST_SUPERUSER=admin@example.com
FIRST_SUPERUSER_PASSWORD=foo
SMTP_HOST=
SMTP_USER=
SMTP_PASSWORD=
EMAILS_FROM_EMAIL=info@example.com
SMTP_TLS=True
SMTP_PORT=587

USERS_OPEN_REGISTRATION=False

Postgres

POSTGRES_SERVER=db
POSTGRES_USER=postgres
POSTGRES_DB=app
POSTGRES_PASSWORD=foo

PgAdmin

PGADMIN_DEFAULT_EMAIL=admin@example.com
PGADMIN_DEFAULT_PASSWORD=foo
PGADMIN_LISTEN_PORT=5050

SENTRY_DSN=

Flower

FLOWER_BASIC_AUTH=

Configure these with your own Docker registry images

DOCKER_IMAGE_BACKEND=backend
DOCKER_IMAGE_CELERYWORKER=celery
DOCKER_IMAGE_FRONTEND=frontend

Probably going to give up on this project for a bit since the documentation isn't working for me. Too bad. I was excited to see a project that takes away a lot of boilerplate.

Check the docker-compose logs. Did the backend start up without errors?

You're looking for a clean startup:

backend_1   | INFO:     Will watch for changes in these directories: ['/app']
backend_1   | INFO:     Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)
backend_1   | INFO:     Started reloader process [1] using WatchFiles
backend_1   | INFO:     Started server process [11]
backend_1   | INFO:     Waiting for application startup.
backend_1   | INFO:     Application startup complete.

This has to work from your browser: http://localhost/api/v1/openapi.json

openapi

If you get it working, let us know how you did it, then close the issue.