chore: adds PostgreSQL

This commit is contained in:
2026-01-27 14:23:58 -05:00
parent 40ea3f45fd
commit 33c6dadb78
6 changed files with 59 additions and 2 deletions

23
scripts/start-infrastructure.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
# Set global configuration
DATA_ROOT="/var/trakqr"
POSTGRES_VERSION="latest"
MONGODB_VERSION="latest"
# Start PostgreSQL
if [ "$(docker ps -a -q -f name=^TRAKQR_POSTGRES$)" ]; then
echo "PostgreSQL container exists. Starting..."
docker start TRAKQR_POSTGRES
else
echo "PostgreSQL container does not exist. Creating..."
docker run -d \
--name TRAKQR_POSTGRES \
-v "${DATA_ROOT}/postgres:/var/lib/postgresql/data" \
-p 5400:5432 \
-e POSTGRES_USER=sa \
-e POSTGRES_PASSWORD=P@ssword123! \
-e POSTGRES_DB=trakqr \
postgres:$POSTGRES_VERSION
fi