Skip to content

Commit

Permalink
[docker-db-update] update docker pgsql database name and password on …
Browse files Browse the repository at this point in the history
….env.example file and on pgsql extension script file
  • Loading branch information
sarthaksavvy committed Oct 7, 2024
1 parent 830bb38 commit 14fb031
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ LOG_LEVEL=debug
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=larachain
DB_DATABASE=laralamma
DB_USERNAME=postgres
DB_PASSWORD=
DB_PASSWORD=secret

SESSION_DRIVER=database
SESSION_LIFETIME=120
Expand Down
6 changes: 3 additions & 3 deletions docker/psql/extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ set -e
# Perform all actions as $POSTGRES_USER
export PGUSER="$POSTGRES_USER"

# Create the 'template_postgis' template db
# Create the 'laralamma' template db
"${psql[@]}" <<- 'EOSQL'
CREATE DATABASE template_postgis IS_TEMPLATE true;
CREATE DATABASE laralamma IS_TEMPLATE true;
EOSQL

# Load PostGIS into both template_database and $POSTGRES_DB
for DB in template_postgis "$POSTGRES_DB"; do
for DB in laralamma "$POSTGRES_DB"; do
echo "Loading PostGIS extensions into $DB"
"${psql[@]}" --dbname="$DB" <<-'EOSQL'
CREATE EXTENSION IF NOT EXISTS postgis;
Expand Down

0 comments on commit 14fb031

Please sign in to comment.