diff --git a/scripts/Dockerfile b/scripts/Dockerfile index d2e3bcefc0b7ce92c437b680ed41db39d7093a0c..54c1a21375e62829a692a08f17a1ea895e746732 100644 --- a/scripts/Dockerfile +++ b/scripts/Dockerfile @@ -65,6 +65,11 @@ RUN set -eux; apt-get update \ && mv ./rel/couchdb /usr/local \ && cd / \ && rm -rf /usr/src/couchdb \ + && curl -fsSL --compressed https://nodejs.org/dist/v12.9.1/node-v12.9.1-linux-x64.tar.xz \ + && tar -xJf "node-v12.9.1-linux-x64.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \ + && rm "node-v12.9.1-linux-x64.tar.xz" \ + && ln -s /usr/local/bin/node /usr/local/bin/nodejs \ + && node --version \ # Cleanup && apt-get purge -y \ build-essential \ @@ -82,6 +87,7 @@ COPY --from=build \ /app/cozy-stack \ /app/scripts/docker-entrypoint.sh \ /app/scripts/cozy-app-dev.sh \ + /app/scripts/konnector-node-run.sh \ /app/MailHog \ /usr/bin/ diff --git a/scripts/cozy-app-dev.sh b/scripts/cozy-app-dev.sh index f6f139252250081af7b9c5c92d93ad974f7f797b..5dc70e28494f8363fc6cbee5c66004913f114034 100755 --- a/scripts/cozy-app-dev.sh +++ b/scripts/cozy-app-dev.sh @@ -8,6 +8,7 @@ set -m [ -z "${COZY_STACK_PASS}" ] && COZY_STACK_PASS="cozy" [ -z "${COZY_STACK_ADMIN_PORT}" ] && COZY_STACK_ADMIN_PORT="6060" [ -z "${COUCHDB_URL}" ] && COUCHDB_URL="http://localhost:5984/" +[ -n "${COZY_KONNECTORS_CMD}" ] && COZY_KONNECTORS_CMD_OPTION="--konnectors-cmd $COZY_KONNECTORS_CMD" if [ -d "${COZY_STACK_PATH}" ] && [ -f "${COZY_STACK_PATH}/cozy-stack" ]; then COZY_STACK_PATH="${COZY_STACK_PATH}/cozy-stack" @@ -109,6 +110,7 @@ do_start() { --admin-port "${COZY_STACK_ADMIN_PORT}" \ --couchdb-url "${COUCHDB_URL}" \ --mailhog \ + ${COZY_KONNECTORS_CMD_OPTION} \ --fs-url "file://localhost${vfsdir}" & wait_for "${COZY_STACK_HOST}:${COZY_STACK_PORT}/version/" "cozy-stack" diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh index 807044f87045c59626d8e61ddf1a769f6a10c228..226da8743db674362bff1375ef33ac2d6bf51a89 100755 --- a/scripts/docker-entrypoint.sh +++ b/scripts/docker-entrypoint.sh @@ -26,6 +26,6 @@ else fi fi -/usr/bin/cozy-app-dev.sh \ +COZY_KONNECTORS_CMD="/usr/bin/konnector-node-run.sh" /usr/bin/cozy-app-dev.sh \ -d "${appdir}" \ -f /data/cozy-storage