Skip to content

Commit

Permalink
Update docker cron config
Browse files Browse the repository at this point in the history
  • Loading branch information
odelaere committed May 10, 2022
1 parent 9839792 commit 9c3d22e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
4 changes: 1 addition & 3 deletions docker-dev.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ zope-conf-additional =
${zope-conf:zamqp}

environment-vars +=
ACTIVE_BIGBANG True
PLONE_EXTENSION_IDS plonetheme.classic:default, plonetheme.sunburst:default, Products.MeetingCommunes:zcity
DEFAULT_LANGUAGE fr
environment-vars += ${bigbang:environment-vars}

[instance-debug]
blob-storage = /data/blobstorage
16 changes: 9 additions & 7 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
environment:
- HOSTNAME=zeo
volumes:
- ./data/:/data
- data:/data
- tmp:/tmp
- vartmp:/var/tmp
networks:
Expand Down Expand Up @@ -51,7 +51,7 @@ services:
- HOSTNAME=instance1
- PLONE_PATH=demo
volumes:
- ./data/:/data
- data:/data
- tmp:/tmp
- vartmp:/var/tmp
healthcheck:
Expand All @@ -77,7 +77,7 @@ services:
- CLUSTER=iadelib_pm42
- HOSTNAME=worker-cron
volumes:
- ./data/:/data
- data:/data
- tmp:/tmp
- vartmp:/var/tmp
healthcheck:
Expand All @@ -101,7 +101,7 @@ services:
healthcheck:
test: "curl -f localhost:8089/$$PLONE_PATH/@@ok"
volumes:
- ./data/:/data
- data:/data
- tmp:/tmp
- vartmp:/var/tmp
labels:
Expand Down Expand Up @@ -134,14 +134,15 @@ services:
healthcheck:
test: "curl -f localhost:8286/$$PLONE_PATH/@@ok"
volumes:
- ./data/:/data
- data:/data
- tmp:/tmp
- vartmp:/var/tmp
labels:
SERVICE_NAME: "worker-cron"
maintenance:
image: imiobe/iadelib:demo-latest
command: maintenance
# command: maintenance
entrypoint: bash
ports:
- "20089:8080"
networks:
Expand All @@ -160,14 +161,15 @@ services:
healthcheck:
test: "curl -f localhost:8080/$$PLONE_PATH/@@ok"
volumes:
- ./data/:/data
- data:/data
- tmp:/tmp
- vartmp:/var/tmp
labels:
SERVICE_NAME: "maintenance"
volumes:
tmp:
vartmp:
data:

networks:
delib_internal:
Expand Down
7 changes: 4 additions & 3 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ 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=240
INTERVAL=1
MAX_TRIES=250
INTERVAL=5
set +e
SECONDS=0
response="$($CURL)"
tries=1
while [[ $response != "200" && $tries -lt $MAX_TRIES ]]
do
echo "Waiting for cron"
sleep $INTERVAL
response=$($CURL)
((tries+=1))
Expand Down Expand Up @@ -72,7 +73,7 @@ fi
case "$1" in
"maintenance")
shift
echo "Executing maintenance command : $@"
echo "Executing maintenance command : '$*'"
exec "$@"
;;
*)
Expand Down
2 changes: 1 addition & 1 deletion scripts/copy-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ for i in "$@"; do
case $i in
-s=* | --server=*)
echo "source found ${i#*=}"
SOURCE_HOST="${i#*=}.imio.be"
SOURCE_HOST="${i#*=}"
shift # past argument=value
;;
-b=* | --buildout=*)
Expand Down

0 comments on commit 9c3d22e

Please sign in to comment.