bibektimilsina000 / fastapi-pgstarterkit Goto Github PK
View Code? Open in Web Editor NEWFastAPI & PostgreSQL starter kit with Docker. Revamped backend template for modern needs.
FastAPI & PostgreSQL starter kit with Docker. Revamped backend template for modern needs.
What are your plans with Celery? It's now in the code but there is no Celery container. Add Celery or remove the support? Now it fails the test case every time.
Currently the config.py
file sets the JWT secret to a random 32 character string upon the service startup and this is a really bad practice because in the wild this would force every single user to relogin upon a deployment among many other issues.
Also, the line load_dotenv()
needs to exist before the definition of the class Settings otherwise environment variables aren't available within the Settings class.
Hi. I got this error right after I installed package and run docker-compose up --build.
fastapi-app_1 | INFO:__main__:Initializing service fastapi-app_1 | INFO:__main__:Starting call to '__main__.init', this is the 1st time calling it. pgadmin | NOTE: Configuring authentication for SERVER mode. pgadmin | pgadmin | pgAdmin 4 - Application Initialisation pgadmin | ====================================== pgadmin | pgadmin | postfix/postlog: starting the Postfix mail system pgadmin | [2023-08-19 23:17:06 +0000] [1] [INFO] Starting gunicorn 20.1.0 pgadmin | [2023-08-19 23:17:06 +0000] [1] [INFO] Listening at: http://[::]:80 (1) pgadmin | [2023-08-19 23:17:06 +0000] [1] [INFO] Using worker: gthread pgadmin | [2023-08-19 23:17:06 +0000] [91] [INFO] Booting worker with pid: 91 fastapi-app_1 | ERROR:__main__:(psycopg2.OperationalError) connection to server at "db" (172.18.0.2), port 5432 failed: Connection timed out fastapi-app_1 | Is the server running on that host and accepting TCP/IP connections? fastapi-app_1 | fastapi-app_1 | (Background on this error at: https://sqlalche.me/e/20/e3q8) fastapi-app_1 | WARNING:__main__:Finished call to '__main__.init' after 129.312(s), this was the 1st time calling it. fastapi-app_1 | INFO:__main__:Starting call to '__main__.init', this is the 2nd time calling it.
I downloaded the repo and ran docker-compose up --build
I tried going to http://localhost:8000/docs as per the readme but got "This site canβt be reached"
I also noticed in the screenshot above that the uvicorn port says 80, not 8000? But even going to localhost:80 doesn't work either though
If I make model changes then run:
alembic revision --autogenerate -m "Added ..."
I get the following error:
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name "db" to address: nodename nor servname provided, or not known
I want to include SQLModel in the backend to remove redundancies between models and schemas. Would that fit your plans with the repo?
Thanks a lot for working on getting this live! I tried to run this on mac and I am getting this issue: any idea on how to fix this? Thanks in advance!
[fastapi-app internal] load metadata for docker.io/library/python:3.11-slim:
failed to solve: python:3.11-slim: error getting credentials - err: exit status 1, out: ``
Hello,
Please, correct me if I'm wrong, but I believe here in /backend/app/app/api/deps.py:
def get_current_active_superuser(
current_user: models.User = Depends(get_current_user),
) -> models.User:
we must depend on get_current_active_user, not get_current_user to make sure that superuser is active.
Hi guys,
First of all, Thank you very much for this amazing starterKit :)
Are there some deployment guidelines?
I am trying to follow the one provided here but it would be definitely better if there were a Deployment guide specifically designed for this starterKit.
Cheers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.