Better datastores security
Some checks failed
Rust / Test (push) Has been cancelled
Rust / Rustfmt (push) Has been cancelled
Rust / Clippy (push) Has been cancelled
Rust / Code coverage (push) Has been cancelled

Localhost only exposed ports and stronger password for Postgres local
environment instance
This commit is contained in:
Alphonse Paix
2025-09-07 12:46:27 +02:00
parent 1ec51f0caf
commit ba6b2dbd93
6 changed files with 5 additions and 31 deletions

View File

@@ -14,7 +14,7 @@ if ! [ -x "$(command -v sqlx)" ]; then
fi
DB_USER="${POSTGRES_USER:=postgres}"
DB_PASSWORD="${POSTGRES_PASSWORD:=password}"
DB_PASSWORD="${POSTGRES_PASSWORD:=Jq09NF6Y8ZXJS4jd9c8U}"
DB_NAME="${POSTGRES_DB:=newsletter}"
DB_PORT="${POSTGRES_PORT:=5432}"
DB_HOST="${POSTGRES_HOST:=localhost}"
@@ -24,7 +24,7 @@ if [[ -z "${SKIP_DOCKER}" ]]; then
-e POSTGRES_USER=${DB_USER} \
-e POSTGRES_PASSWORD=${DB_PASSWORD} \
-e POSTGRES_DB=${DB_NAME} \
-p "${DB_PORT}":5432 \
-p "127.0.0.1:${DB_PORT}":5432 \
-d postgres \
postgres -N 1000
fi

View File

@@ -10,7 +10,7 @@ if [[ -n $RUNNING_CONTAINER ]]; then
fi
docker run \
-p "6379:6379" \
-p "127.0.0.1:6379:6379" \
-d \
--name "redis_$(date '+%s')" \
redis