Skip to content

Commit

Permalink
avoid starting processe in fg because of debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
odelaere committed Nov 25, 2021
1 parent 5c7173d commit 3fd1328
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
1 change: 1 addition & 0 deletions docker-dev.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ zeo-address = zeo:8100

[instance]
<= instance1
debug-mode = off
blob-storage = /data/blobstorage
shared-blob = on
zope-conf-additional =
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ services:
test: "curl -f localhost:8087/$$PLONE_PATH/@@ok"
labels:
SERVICE_NAME: "worker-cron"
restart:
unless-stopped
# restart:
# unless-stopped
worker-async:
image: imiobe/iadelib:latest
command: instance-async
Expand Down
24 changes: 22 additions & 2 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,27 @@ function wait_for_cron() {
done
}

function start() {
echo "Starting $1"
cmd="bin/$1"
_stop() {
echo "Forcing to stop"
$cmd stop
case "$cmd" in
"bin/zeoserver")
if [[ -f /data/filestorage/Data.fs.lock ]]; then
kill -TERM "$(cat /data/filestorage/Data.fs.lock)" 2>/dev/null
fi
;;
*)
;;
esac
}

trap _stop
$cmd start
exec "$cmd" "logtail"
}

setup "$1"

Expand All @@ -41,7 +62,6 @@ case "$1" in
exec "bash"
;;
*)
echo "Starting $1"
exec "bin/python" "bin/$1" "fg"
start "$1"
;;
esac

0 comments on commit 3fd1328

Please sign in to comment.