diff --git a/docker/docker-compose-dev.yml b/docker/docker-compose-dev.yml index 1966781..111efb8 100644 --- a/docker/docker-compose-dev.yml +++ b/docker/docker-compose-dev.yml @@ -43,7 +43,7 @@ services: depends_on: - zeo - libreoffice - - worker-cron +# - worker-cron environment: - ZEO_CLIENT_CACHE_SIZE=1000MB - ZODB_CACHE_SIZE=100000 @@ -58,32 +58,32 @@ services: test: "curl -f localhost:8081/$$PLONE_PATH/@@ok" labels: SERVICE_NAME: "instance1" - worker-cron: - image: imiobe/iadelib:dev - command: instance-cron - ports: - - "8087:8087" - networks: - - delib_internal - - delib_external - depends_on: - - zeo - environment: - - ZEO_CLIENT_CACHE_SIZE=1000MB - - ZODB_CACHE_SIZE=100000 - - ADMIN_PASSWORD=test - - PUBLIC_URL=http://localhost/PM - - PLONE_PATH=demo - - CLUSTER=iadelib_pm42 - - HOSTNAME=worker-cron - volumes: - - ./data/:/data - - tmp:/tmp - - vartmp:/var/tmp - healthcheck: - test: "curl -f localhost:8087/$$PLONE_PATH/@@ok" - labels: - SERVICE_NAME: "worker-cron" + # worker-cron: + # image: imiobe/iadelib:dev + # command: instance-cron + # ports: + # - "8087:8087" + # networks: + # - delib_internal + # - delib_external + # depends_on: + # - zeo + # environment: + # - ZEO_CLIENT_CACHE_SIZE=1000MB + # - ZODB_CACHE_SIZE=100000 + # - ADMIN_PASSWORD=test + # - PUBLIC_URL=http://localhost/PM + # - PLONE_PATH=demo + # - CLUSTER=iadelib_pm42 + # - HOSTNAME=worker-cron + # volumes: + # - ./data/:/data + # - tmp:/tmp + # - vartmp:/var/tmp + # healthcheck: + # test: "curl -f localhost:8087/$$PLONE_PATH/@@ok" + # labels: + # SERVICE_NAME: "worker-cron" worker-async: image: imiobe/iadelib:dev command: instance-async @@ -92,7 +92,7 @@ services: depends_on: - zeo - libreoffice - - worker-cron +# - worker-cron environment: - ZEO_CLIENT_CACHE_SIZE=1000MB - ZODB_CACHE_SIZE=100000 diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 9a94c81..dba7945 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -46,7 +46,7 @@ services: depends_on: - zeo - libreoffice - - worker-cron +# - worker-cron environment: - ZEO_CLIENT_CACHE_SIZE=1000MB - ZODB_CACHE_SIZE=100000 @@ -62,32 +62,32 @@ services: labels: SERVICE_NAME: "instance1" - worker-cron: - image: imiobe/iadelib:latest - command: instance-cron - ports: - - "8087:8087" - networks: - - delib_internal - - delib_external - depends_on: - - zeo - environment: - - ZEO_CLIENT_CACHE_SIZE=1000MB - - ZODB_CACHE_SIZE=100000 - - ADMIN_PASSWORD=test - - PUBLIC_URL=http://localhost/PM - - PLONE_PATH=demo - - CLUSTER=iadelib_pm42 - - HOSTNAME=worker-cron - volumes: - - ./data:/data - - tmp:/tmp - - vartmp:/var/tmp - healthcheck: - test: "curl -f localhost:8087/$$PLONE_PATH/@@ok" - labels: - SERVICE_NAME: "worker-cron" + # worker-cron: + # image: imiobe/iadelib:latest + # command: instance-cron + # ports: + # - "8087:8087" + # networks: + # - delib_internal + # - delib_external + # depends_on: + # - zeo + # environment: + # - ZEO_CLIENT_CACHE_SIZE=1000MB + # - ZODB_CACHE_SIZE=100000 + # - ADMIN_PASSWORD=test + # - PUBLIC_URL=http://localhost/PM + # - PLONE_PATH=demo + # - CLUSTER=iadelib_pm42 + # - HOSTNAME=worker-cron + # volumes: + # - ./data:/data + # - tmp:/tmp + # - vartmp:/var/tmp + # healthcheck: + # test: "curl -f localhost:8087/$$PLONE_PATH/@@ok" + # labels: + # SERVICE_NAME: "worker-cron" worker-async: image: imiobe/iadelib:latest @@ -122,7 +122,7 @@ services: - delib_external depends_on: - zeo - - worker-cron +# - worker-cron environment: - ZEO_CLIENT_CACHE_SIZE=1000MB - ZODB_CACHE_SIZE=100000 @@ -144,7 +144,7 @@ services: - tmp:/tmp - vartmp:/var/tmp labels: - SERVICE_NAME: "worker-cron" + SERVICE_NAME: "worker-amqp" maintenance: image: imiobe/iadelib:latest @@ -156,7 +156,7 @@ services: depends_on: - zeo - libreoffice - - worker-cron +# - worker-cron environment: - ZEO_CLIENT_CACHE_SIZE=1000MB - ZODB_CACHE_SIZE=100000 diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 86a756e..6d18baf 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -10,31 +10,31 @@ function setup() { fi chmod 777 /data/* } -function wait_for_cron() { - echo "Waiting for cron" - URL="worker-cron:8087/$PLONE_PATH" - CURL="curl --write-out %{http_code} -so /dev/null $URL/@@ok" - MAX_TRIES=50 - INTERVAL=5 - set +e - SECONDS=0 - response="404" - tries=0 - while [[ $response != "200" && $tries -lt $MAX_TRIES ]] - do - sleep $INTERVAL - echo "Waiting for cron" - response=$($CURL) - ((tries+=1)) - done - set -e - if [[ $tries == "$MAX_TRIES" ]]; then - echo "Failed to reach $URL after $SECONDS s" - exit 1 - else - echo "$URL is up. Waited $SECONDS s" - fi -} +# function wait_for_cron() { +# echo "Waiting for cron" +# URL="worker-cron:8087/$PLONE_PATH" +# CURL="curl --write-out %{http_code} -so /dev/null $URL/@@ok" +# MAX_TRIES=50 +# INTERVAL=5 +# set +e +# SECONDS=0 +# response="404" +# tries=0 +# while [[ $response != "200" && $tries -lt $MAX_TRIES ]] +# do +# sleep $INTERVAL +# echo "Waiting for cron" +# response=$($CURL) +# ((tries+=1)) +# done +# set -e +# if [[ $tries == "$MAX_TRIES" ]]; then +# echo "Failed to reach $URL after $SECONDS s" +# exit 1 +# else +# echo "$URL is up. Waited $SECONDS s" +# fi +# } function start() { echo "Starting $1" cmd="bin/$1" @@ -61,10 +61,10 @@ function start() { setup "$1" -PRIORIY="instance-cron instance-debug maintenance script zeoserver" -if [[ "instance" == "$1" || ( ! $PRIORIY == *"$1"* && $# -gt 0 ) ]]; then - wait_for_cron "$1" -fi +#PRIORIY="instance-cron instance-debug maintenance script zeoserver" +#if [[ "instance" == "$1" || ( ! $PRIORIY == *"$1"* && $# -gt 0 ) ]]; then +# wait_for_cron "$1" +#fi case "$1" in "")