CdC-SI / eak-copilot

The official repository of the EAK-Copilot project as part of the Innovation Fellowship 2024.
https://cdc-si.github.io/eak-copilot/
GNU General Public License v3.0
4 stars 0 forks source link

create servers.json from Dockerfile #120

Open K-Schubert opened 2 months ago

K-Schubert commented 2 months ago

Create a servers.json file from .env vars in pgadmin/Dockerfile.

Something like:

!/bin/bash

Create the servers.json file with database connection details

cat << EOF > /pgadmin4/servers.json { "Servers": { "1": { "Name": "Primary Database", "Group": "Servers", "Host": "$POSTGRES_HOST", "Port": 5432, "MaintenanceDB": "$POSTGRES_MAINTENANCE_DB", "Username": "$POSTGRES_USER", "Password": "$POSTGRES_PASSWORD", "SSLMode": "prefer" } } } EOF

Start pgAdmin4

exec /entrypoint.sh