personam-solis / cladis-notitia

Disaster Information
MIT License
0 stars 0 forks source link

Create and Configure Docker Postgres #4

Open personam-solis opened 7 months ago

personam-solis commented 7 months ago

Create a PostgreSQL DB server using Docker (postgres:16). The below need to be considered for authentication and usability

Bonus: user pgadmin Docker container

personam-solis commented 7 months ago

Create a repo for any container that is made

personam-solis commented 7 months ago

Container Memory - Max of 8 GB DB Memory - 90% Threads - 4

personam-solis commented 7 months ago
docker run --rm -d \
    -p 5455:5432  \
    --cpus 4 \
    --health-timeout 30s \
    --memory 9g \
    --mount source=cladis,target=/var/lib/postgresql
personam-solis commented 7 months ago

postgres configs:

personam-solis commented 7 months ago

USE THE DOCKER API

check if the cladis volume exists, if not, ask the user where they want it to be

Docker Volume:

docker volume create --driver local \
    --opt type=nfs \
    --opt o=addr=192.168.1.1,rw \
    --opt device=:/path/to/dir \
    foo
personam-solis commented 6 months ago

users:

personam-solis commented 6 months ago

ready to start working on the test

personam-solis commented 6 months ago

Logging cookbook https://docs.python.org/3/howto/logging-cookbook.html

personam-solis commented 6 months ago

When an exception happens, delete the container!!

personam-solis commented 6 months ago

raise an exception but customize it when it happens AFTER deleting the container