-
Notifications
You must be signed in to change notification settings - Fork 643
dataconnect: make stdout of helper postgres podman scripts less verbose #7134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,11 @@ | |
# server is already running (it will just be a no-op). | ||
|
||
set -euo pipefail | ||
set -xv | ||
|
||
function run_command { | ||
echo "$*" | ||
"$@" | ||
} | ||
|
||
# Determine the absolute path of the directory containing this file. | ||
readonly SCRIPT_DIR="$(readlink -f $(dirname "$0"))" | ||
|
@@ -28,11 +32,11 @@ readonly SCRIPT_DIR="$(readlink -f $(dirname "$0"))" | |
# Bind the PostgreSQL server to port 5432 on the host, so that the host can connect to it. | ||
# Bind the pgadmin server to port 8888 on the host, so that the host can connect to it. | ||
if ! podman pod exists dataconnect_postgres ; then | ||
podman pod create -p 5432:5432 -p 8888:80 dataconnect_postgres | ||
run_command podman pod create -p 5432:5432 -p 8888:80 dataconnect_postgres | ||
fi | ||
|
||
# Start the PostgreSQL server. | ||
podman \ | ||
run_command podman \ | ||
run \ | ||
-dt \ | ||
--rm \ | ||
|
@@ -44,7 +48,7 @@ podman \ | |
# Start the pgadmin4 server. | ||
readonly PGADMIN_EMAIL="[email protected]" | ||
readonly PGADMIN_PASSWORD="password" | ||
podman \ | ||
run_command podman \ | ||
run \ | ||
-dt \ | ||
--rm \ | ||
|
@@ -55,13 +59,9 @@ podman \ | |
--mount "type=volume,src=dataconnect_pgadmin_data,dst=/var/lib/pgadmin" \ | ||
docker.io/dpage/pgadmin4 | ||
|
||
# Turn off verbose logging so that the epilogue below is not littered with bash statements. | ||
set +xv | ||
echo | ||
|
||
cat <<EOF | ||
SUCCESS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
||
PostegreSQL server running on port 5432 | ||
The pgAdmin web UI can be viewed at http://localhost:8888 | ||
The pgAdmin login credentails are: username "${PGADMIN_EMAIL}" and password "${PGADMIN_PASSWORD}" | ||
|
@@ -76,7 +76,6 @@ To delete the postgresql database, run | |
To delete the containers, run | ||
podman pod rm --force dataconnect_postgres | ||
|
||
When running the Firebase Data Connect emulator, use this postgresql connection string | ||
in .firebaserc: | ||
When running the Firebase Data Connect emulator, use this postgresql connection string: | ||
postgresql://postgres:postgres@localhost:5432?sslmode=disable | ||
EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.