updated default credentials

This commit is contained in:
Annika Hannig 2022-11-10 10:04:40 +01:00
parent 88ba3ac7e1
commit b996f8ed0f
2 changed files with 6 additions and 4 deletions

View File

@ -8,6 +8,8 @@ services:
ports: ports:
- 5432:5432 - 5432:5432
environment: environment:
POSTGRES_PASSWORD: postgres POSTGRES_USER: alice
POSTGRES_PASSWORD: alice
POSTGRES_DB: alice
volumes: volumes:
- ./_data:/var/lib/postgresql/data - ./_data:/var/lib/postgresql/data

View File

@ -24,11 +24,11 @@ if [ -z $PGDATABASE ]; then
fi fi
if [ -z $PGUSER ]; then if [ -z $PGUSER ]; then
export PGUSER="postgres" export PGUSER="alice"
fi fi
if [ -z $PGPASSWORD ]; then if [ -z $PGPASSWORD ]; then
export PGPASSWORD="postgres" export PGPASSWORD="alice"
fi fi
## Commandline opts: ## Commandline opts:
@ -61,7 +61,7 @@ fi
if [ $OPT_CLEAR -eq 1 ]; then if [ $OPT_CLEAR -eq 1 ]; then
echo "++ clearing database" echo "++ clearing database"
$PSQL template1 -c "DROP DATABASE $PGDATABASE" $PSQL template1 -c "DROP DATABASE IF EXISTS $PGDATABASE"
$PSQL template1 -c "CREATE DATABASE $PGDATABASE" $PSQL template1 -c "CREATE DATABASE $PGDATABASE"
fi fi
###################################################################### ######################################################################