-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from beclab/fix/docker-citus
fix: citus image build
- Loading branch information
Showing
6 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- wrap in transaction to ensure Docker flag always visible | ||
BEGIN; | ||
CREATE EXTENSION citus; | ||
|
||
-- add Docker flag to node metadata | ||
UPDATE pg_dist_node_metadata SET metadata=jsonb_insert(metadata, '{docker}', 'true'); | ||
COMMIT; |
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
# variables adapted from https://github.com/docker-library/healthcheck | ||
host="$(hostname -i || echo '127.0.0.1')" | ||
user="${POSTGRES_USER:-postgres}" | ||
db="${POSTGRES_DB:-$POSTGRES_USER}" | ||
|
||
pg_isready -h "${host}" -p 5432 \ | ||
-d "${db}" -U "${user}" \ | ||
--timeout=5 --quiet || exit 1 |
This file contains 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
# wait-for-manager.sh | ||
|
||
set -e | ||
|
||
until test -f /healthcheck/manager-ready ; do | ||
>&2 echo "Manager is not ready - sleeping" | ||
sleep 1 | ||
done | ||
|
||
>&2 echo "Manager is up - starting worker" | ||
|
||
exec gosu postgres "/usr/local/bin/docker-entrypoint.sh" "postgres" |
This file contains 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