Skip to content

ApplETS/Hello-Database-Setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Databases Setup Guide

Prerequisite

All the librairies or tools needed to be install beforehand:

Installation

To create the database simply clone this repository and do these command:

  1. Clone the repo and navigate in a terminal to the directory.
  2. Copy .env.template into .env and modify the values according to your need. (Keep in mind theses values will be used to create the DB and will be needed to connect to the DB). You can keep the default values for a local development setup.
  3. Run this in a terminal: docker compose up -d

And that's it, you have a database running on your machine! This will look a bit like this: Docker look into database

You can then set your connection string in both your project with theses values:

# Pour ps
User ID=$POSTGRES_USER;Password=$POSTGRES_PASSWORD;Host=host.docker.internal;Port=5432;Database=ps;

# Pour pfe
User ID=$POSTGRES_USER;Password=$POSTGRES_PASSWORD;Host=host.docker.internal;Port=5432;Database=pfe;

Access using Adminer

To access the adminer, navigate to localhost:8090 and use the following credentials:

  • System: PostgreSQL
  • Server: host.docker.internal
  • Username: $POSTGRES_USER
  • Password: $POSTGRES_PASSWORD
  • Database: $POSTGRES_DB

FAQ

For more information concerning Docker go to: https://docs.docker.com/manuals/

Releases

No releases published

Packages

No packages published