Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Database PostgreSQL


The database used in LandGriffon is PostgreSQL.

To setup it properly first you have to configure some environment variables and then start the PostgreSQL container.

1. System dependencies

  • Docker: used to start PostgreSQL so that it does not need to be installed in the host.

2. Configure environment variables

You need to setup some environment variables before starting PostgreSQL. Using docker compose and the docker-compose.yml file at the root of the repository, you can start it without manually set the environment variables in the shell.

Environment variables needed and which service uses it is explained in the ENV_VARS.md file.

3. Start the container

3.1. Configure environment variables

  • PG_H3_VERSION Used to set a build argument of the same name (default: 3.7.2).
  • API_POSTGRES_PORT Used to set the exported port to connect to the database (default: 5432)
  • API_POSTGRES_PASSWORD (used to set POSTGRES_PASSWORD in the container)
  • API_POSTGRES_USERNAME (used to set POSTGRES_USER in the container)
  • API_POSTGRES_DATABASE (used to set POSTGRES_DB in the container)

3.2. Start the service

To start the database service just execute:

docker compose up postgresql

↩️ GO TO ROOT DOC