SirAdriG99 / SKJ005-Vets_And_Shelters

MIT License
0 stars 0 forks source link

Create Containerfiles #6

Open SirAdriG99 opened 9 months ago

SirAdriG99 commented 9 months ago

Create the containerfiles for the database, for the environment where the model will be executed and a general for the back-end, back-office and front-office

AdrianMasia commented 9 months ago

Database -> PostgreSQL Back-end -> Quarkus Back-office -> Quarkus Front-office -> Quarkus AI model -> Python

al386152 commented 9 months ago

Related to the PostgreSQL:

Some Docker's Volume's command :

sudo docker volume ls sudo docker volume inspect [volume] sudo docker volume create db-data-vol sudo docker create --name db-psql postgres sudo docker ps -a

The place where the Data Base's volume will be.

${PWD}/SKJ005-Vets_And_Shelters/sql/db-volume

To create the container and the volume on the proyect's DB folder.

sudo docker run \ --name db-psql \ -e POSTGRES_USER=user \ -e POSTGRES_PASSWORD=patata \ -e PGDATA=/var/lib/postgresql/data/pgdata \ -v ${PWD}/SKJ005-Vets_And_Shelters/sql/db-volume:/var/lib/postgresql/data \ -p 5432:5432 \ -it postgres

Important: Choose a good user and password.

To connect:

psql -h localhost -P 5432 -U user

Sources: