diff --git a/hosting/couchdb/Dockerfile.v2 b/hosting/couchdb/Dockerfile.v2 index 912344a903..126742cadb 100644 --- a/hosting/couchdb/Dockerfile.v2 +++ b/hosting/couchdb/Dockerfile.v2 @@ -96,6 +96,8 @@ EXPOSE 5984 4369 9100 CMD ["/opt/couchdb/bin/couchdb"] FROM base as runner +ARG TARGETARCH +ENV TARGETARCH $TARGETARCH ENV COUCHDB_USER admin ENV COUCHDB_PASSWORD admin @@ -126,8 +128,10 @@ ADD clouseau/log4j.properties clouseau/clouseau.ini ./ WORKDIR /opt/couchdb ADD couch/vm.args couch/local.ini ./etc/ +# setup SQS WORKDIR /opt/sqs -ADD sqs/sqs sqs/better_sqlite3.node ./ +ADD sqs ./ +RUN chmod +x ./install.sh && ./install.sh WORKDIR / ADD runner.v2.sh ./bbcouch-runner.sh diff --git a/hosting/couchdb/sqs/arm/better_sqlite3.node b/hosting/couchdb/sqs/arm/better_sqlite3.node new file mode 100755 index 0000000000..3c4ed6d327 Binary files /dev/null and b/hosting/couchdb/sqs/arm/better_sqlite3.node differ diff --git a/hosting/couchdb/sqs/sqs b/hosting/couchdb/sqs/arm/sqs similarity index 80% rename from hosting/couchdb/sqs/sqs rename to hosting/couchdb/sqs/arm/sqs index d445ab8149..a52eaaa2a3 100755 Binary files a/hosting/couchdb/sqs/sqs and b/hosting/couchdb/sqs/arm/sqs differ diff --git a/hosting/couchdb/sqs/install.sh b/hosting/couchdb/sqs/install.sh new file mode 100644 index 0000000000..b2fa2af275 --- /dev/null +++ b/hosting/couchdb/sqs/install.sh @@ -0,0 +1,14 @@ +#!/bin/bash +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )" +if [[ $TARGETARCH == arm* ]] ; +then + echo "Installing ARM SQS Client..." + mv $SCRIPT_DIR/arm/* . + rm -r $SCRIPT_DIR/arm + rm -r $SCRIPT_DIR/x86 +else + echo "Installing x86-64 SQS Client..." + mv $SCRIPT_DIR/x86/* . + rm -r $SCRIPT_DIR/arm + rm -r $SCRIPT_DIR/x86 +fi diff --git a/hosting/couchdb/sqs/better_sqlite3.node b/hosting/couchdb/sqs/x86/better_sqlite3.node similarity index 100% rename from hosting/couchdb/sqs/better_sqlite3.node rename to hosting/couchdb/sqs/x86/better_sqlite3.node diff --git a/hosting/couchdb/sqs/x86/sqs b/hosting/couchdb/sqs/x86/sqs new file mode 100755 index 0000000000..9de3349267 Binary files /dev/null and b/hosting/couchdb/sqs/x86/sqs differ