From de7f4f5c358a644c9ed1ce991e8d1f1de9d6b47f Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Sun, 11 Dec 2022 07:13:28 -0800 Subject: [PATCH] allow protocol to be specified in argument work towards issue #48 --- Dockerfile | 2 +- wait-for-synapse.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index f15df4d..e138d8f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,4 +11,4 @@ ENV CONFIG_FILE=/data/config.yaml VOLUME /data WORKDIR /data EXPOSE 5000 -CMD [ "python", "/usr/src/app/pnut-matrix.py", "-d" ] +CMD [ "python", "/usr/src/app/pnut-matrix.py" ] diff --git a/wait-for-synapse.sh b/wait-for-synapse.sh index 1c07041..1e484d8 100755 --- a/wait-for-synapse.sh +++ b/wait-for-synapse.sh @@ -3,7 +3,7 @@ # # based on an exmaple from https://docs.docker.com/compose/startup-order/ # -# command: ["./wait-for-synapse.sh", "synapse", "python", "/usr/src/app/pnut-matrix.py", "-d"] +# command: ["/usr/src/app/wait-for-synapse.sh", "http://synapse:8008", "python", "/usr/src/app/pnut-matrix.py", "-d"] set -e @@ -17,7 +17,7 @@ host="$1" # This is done for `exec "$@"` below to work correctly shift -until [ "200" -eq $(curl -s -o /dev/null --head -w "%{http_code}" https://${host}/_matrix/client/versions) ]; do +until [ "200" -eq $(curl -s -o /dev/null --head -w "%{http_code}" ${host}/_matrix/client/versions) ]; do >&2 echo "synapse is unavailable - sleeping" sleep 3 done