Skip to content

Commit

Permalink
Update default entry point
Browse files Browse the repository at this point in the history
  • Loading branch information
odelaere committed Jun 2, 2022
1 parent 364b811 commit e55bc73
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile-base
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@ ENV ZEO_ADDRESS=zeo:8100 \

EXPOSE 8081
ENTRYPOINT ["/plone/docker-entrypoint.sh"]
CMD ["instance"]
CMD [""]
2 changes: 1 addition & 1 deletion docker/Dockerfile-demo
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ ENV ZEO_ADDRESS=zeo:8100 \

EXPOSE 8081
ENTRYPOINT ["/plone/docker-entrypoint.sh"]
CMD ["instance"]
CMD [""]
2 changes: 1 addition & 1 deletion docker/Dockerfile-dev
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ RUN sed -i "s/\${buildout:directory}\/var/\/data/g" *.cfg \
USER imio
EXPOSE 8081
ENTRYPOINT ["/plone/docker-entrypoint.sh"]
CMD ["instance"]
CMD [""]
2 changes: 1 addition & 1 deletion docker/Dockerfile-latest
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ ENV ZEO_ADDRESS=zeo:8100 \

EXPOSE 8081
ENTRYPOINT ["/plone/docker-entrypoint.sh"]
CMD ["instance"]
CMD [""]
1 change: 0 additions & 1 deletion docker/docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ services:
# SERVICE_NAME: "worker-cron"
maintenance:
image: imiobe/iadelib:dev
command: maintenance
ports:
- "20089:8080"
networks:
Expand Down
2 changes: 0 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ services:

maintenance:
image: imiobe/iadelib:demo-latest
# command: maintenance
entrypoint: bash
ports:
- "20089:8080"
networks:
Expand Down
13 changes: 8 additions & 5 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ function wait_for_cron() {
INTERVAL=5
set +e
SECONDS=0
response="$($CURL)"
tries=1
response="404"
tries=0
while [[ $response != "200" && $tries -lt $MAX_TRIES ]]
do
echo "Waiting for cron"
sleep $INTERVAL
echo "Waiting for cron"
response=$($CURL)
((tries+=1))
done
Expand Down Expand Up @@ -54,19 +54,22 @@ function start() {

trap _stop SIGTERM SIGINT
$cmd start
# ensure file xists otherwise logtail returns 1
# ensure file exists otherwise logtail returns 1
touch "/data/log/$HOSTNAME.log"
exec "$cmd" "logtail"
}

setup "$1"

PRIORIY="instance-cron instance-debug maintenance zeoserver"
if [[ "instance" == "$1" || ! $PRIORIY == *"$1"* ]]; then
if [[ "instance" == "$1" || ( ! $PRIORIY == *"$1"* && $# -gt 0 ) ]]; then
wait_for_cron "$1"
fi

case "$1" in
"")
exit 0
;;
"maintenance")
shift
echo "Executing maintenance command : '$*'"
Expand Down

0 comments on commit e55bc73

Please sign in to comment.