Giter Site home page Giter Site logo

Comments (4)

yezz123 avatar yezz123 commented on May 23, 2024 2

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.

Elamurugan-Nallathambi avatar Elamurugan-Nallathambi commented on May 23, 2024 1

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.

Elamurugan-Nallathambi avatar Elamurugan-Nallathambi commented on May 23, 2024

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.

yezz123 avatar yezz123 commented on May 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.