Comments (4)
Let me share my default configuration with you
# Backend API
PROJECT_NAME= FRDP
DOMAIN= http://localhost:8080
# openssl rand -hex 32 - Generate secret key
SECRET_KEY= SecretKey
USERS_OPEN_REGISTRATION= true
EMAIL_RESET_TOKEN_EXPIRE_HOURS= 48
# Server Settings
SERVER_NAME= localhost
SERVER_HOST= http://localhost:8080
# Postgres default username and password
POSTGRES_USER= postgres
POSTGRES_PASSWORD= postgres
POSTGRES_DB= frdp
POSTGRES_PORT= 5432
POSTGRES_SERVER= pgdb
# PGADMIN_LISTEN_PORT
PGADMIN_DEFAULT_EMAIL= [email protected]
PGADMIN_DEFAULT_PASSWORD= postgres
I guess the issue is related to the database here or the server of the database we use mostly the name of the Docker container as you see:
pgdb:
image: postgres:12
container_name: postgres_db
restart: always
volumes:
- postgres-data:/var/lib/postgresql/data/
env_file:
- ./.env
ports:
- "5432:5432"
we have the pgdb that's why it's would not run for you
from frdp.
Hello Yasser,
Thank you for addressing this queries so quickly, I ended up inserting bcrypt hashed password based super_user row into users table manually since to use the API I require to have atleast one user.
from frdp.
Thank you so much for checking my question and sharing this resolution. The following works ok
.env
# Backend API
PROJECT_NAME=FRDP
DOMAIN=http://localhost:8080
# openssl rand -hex 32 - Generate secret key
SECRET_KEY=SecretKey
USERS_OPEN_REGISTRATION=true
EMAIL_RESET_TOKEN_EXPIRE_HOURS=48
# Server Settings
SERVER_NAME=localhost
SERVER_HOST=http://localhost:8080
# Postgres default username and password
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=frdp
POSTGRES_PORT=5432
POSTGRES_SERVER=pgdb
# PGADMIN_LISTEN_PORT
[email protected]
PGADMIN_DEFAULT_PASSWORD=postgres
docker-compose
pgdb:
image: postgres:12.9
container_name: postgres_db
restart: always
volumes:
- postgres-data:/var/lib/postgresql/data/
env_file:
- ./.env
ports:
- "5432:5432"
After this update and clearing the previous docker volumes worked ok., still I manually assigned the user to the frdp
Db
GRANT ALL PRIVILEGES ON DATABASE frdp TO postgres;
then DB access also worked ok.
Only one more question is, users
table doesn't have entries. If I create a user from postman, that user will became super_user?
from frdp.
Thank you so much for checking my question and sharing this resolution. The following works ok
.env
# Backend API PROJECT_NAME=FRDP DOMAIN=http://localhost:8080 # openssl rand -hex 32 - Generate secret key SECRET_KEY=SecretKey USERS_OPEN_REGISTRATION=true EMAIL_RESET_TOKEN_EXPIRE_HOURS=48 # Server Settings SERVER_NAME=localhost SERVER_HOST=http://localhost:8080 # Postgres default username and password POSTGRES_USER=postgres POSTGRES_PASSWORD=postgres POSTGRES_DB=frdp POSTGRES_PORT=5432 POSTGRES_SERVER=pgdb # PGADMIN_LISTEN_PORT [email protected] PGADMIN_DEFAULT_PASSWORD=postgres
docker-compose
pgdb: image: postgres:12.9 container_name: postgres_db restart: always volumes: - postgres-data:/var/lib/postgresql/data/ env_file: - ./.env ports: - "5432:5432"
After this update and clearing the previous docker volumes worked ok.
Only one more question is,
users
table doesn't have entries. If I create a user from the postman, that user will become super_user?
You can create it using the curl command or also inject it directly to the database u have the UI part in this link: http://localhost:5050/
from frdp.
Related Issues (11)
- Feature : Add Logout Route 🚀
- API-Test : Create a Frontend UI with React 🚀 HOT 2
- Fix 2 Maintainability issues in api\endpoints\login.py HOT 1
- Fix 3 Maintainability issues in Dockerfile HOT 1
- Fix 2 Maintainability issues in crud\base.py HOT 1
- pydantic.error_wrappers.ValidationError: 1 validation error for Msg 🛠
- Fix 3 Maintainability issues in Dockerfile 🛠
- No value for argument 'db' in unbound method call
- pydantic.error_wrappers.ValidationError: 1 validation error for blognote response -> autor HOT 1
- Refactor & Rebuild the Boilerplate
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frdp.