mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 12:03:59 +00:00
- install.py: Major update including configuration variable expansion, improved k3s/k3d handling, and enhanced installation logic. - etc/ scripts: Significant refactoring of initialization scripts (Kerberos, Port Forwards, Garage Store, etc.). - Port Forwards: Transitioned from XML to port-mappings.conf for managing kubectl port-forwards. - Status Reporting: Improved status checking for common services. - Infrastructure: Updated Ansible inventory and rsyslog role configurations. - Tests: Added a comprehensive suite of tests for 'etc' initialization scripts in prole/tests/etc/. - Documentation: Added prole-db-documentation-mcp-architecture.md. - General: Updated Dockerfiles and various helper scripts.
26 lines
910 B
Bash
Executable File
26 lines
910 B
Bash
Executable File
#!/bin/bash
|
|
|
|
PROLE_HOME="${PROLE_HOME:-$HOME/dev/prole}"
|
|
PROLE_DATA="${PROLE_DATA:-$PROLE_HOME/data}"
|
|
PROLE_DATA="${PROLE_DATA%/}"
|
|
|
|
if [[ -z "${POSTGRES_PASSWORD:-}" ]]; then
|
|
echo "ERROR: POSTGRES_PASSWORD is required. Store it in OpenBao (kv/prole/<namespace>/db#password) or export it." >&2
|
|
exit 1
|
|
fi
|
|
|
|
PG_VERSION=$(cat "$PROLE_HOME/conf/postgresql/.version" 2>/dev/null | tr -d '[:space:]')
|
|
RELEASE=$(cat "$PROLE_HOME/prole-db/.version" 2>/dev/null | tr -d '[:space:]')
|
|
if [[ "$RELEASE" =~ ^[0-9]+$ ]]; then RELEASE=$(printf "%03d" "$RELEASE"); fi
|
|
IMAGE="prole-db:${PG_VERSION:-17.7}-${RELEASE:-043}"
|
|
|
|
docker run --rm -it -u root \
|
|
--hostname=prole-db-00n \
|
|
-e POSTGRES_PASSWORD="$POSTGRES_PASSWORD" \
|
|
--env=PATH=/usr/lib/postgresql/17/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
|
|
--volume="${PROLE_DATA}:/data" \
|
|
--network=bridge \
|
|
--entrypoint bash \
|
|
--restart=no \
|
|
$IMAGE
|