Skip to content

Commit 3fd1328

Browse files
committed
avoid starting processe in fg because of debug mode
1 parent 5c7173d commit 3fd1328

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

docker-dev.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ zeo-address = zeo:8100
1515

1616
[instance]
1717
<= instance1
18+
debug-mode = off
1819
blob-storage = /data/blobstorage
1920
shared-blob = on
2021
zope-conf-additional =

docker/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ services:
145145
test: "curl -f localhost:8087/$$PLONE_PATH/@@ok"
146146
labels:
147147
SERVICE_NAME: "worker-cron"
148-
restart:
149-
unless-stopped
148+
# restart:
149+
# unless-stopped
150150
worker-async:
151151
image: imiobe/iadelib:latest
152152
command: instance-async

docker/docker-entrypoint.sh

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,27 @@ function wait_for_cron() {
2828
done
2929
}
3030

31+
function start() {
32+
echo "Starting $1"
33+
cmd="bin/$1"
34+
_stop() {
35+
echo "Forcing to stop"
36+
$cmd stop
37+
case "$cmd" in
38+
"bin/zeoserver")
39+
if [[ -f /data/filestorage/Data.fs.lock ]]; then
40+
kill -TERM "$(cat /data/filestorage/Data.fs.lock)" 2>/dev/null
41+
fi
42+
;;
43+
*)
44+
;;
45+
esac
46+
}
47+
48+
trap _stop
49+
$cmd start
50+
exec "$cmd" "logtail"
51+
}
3152

3253
setup "$1"
3354

@@ -41,7 +62,6 @@ case "$1" in
4162
exec "bash"
4263
;;
4364
*)
44-
echo "Starting $1"
45-
exec "bin/python" "bin/$1" "fg"
65+
start "$1"
4666
;;
4767
esac

0 commit comments

Comments
 (0)