Skip to content

Commit f6675f5

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

File tree

3 files changed

+34
-12
lines changed

3 files changed

+34
-12
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: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ services:
1818
mem_reservation: 150M
1919
mem_swappiness: 0
2020
zeo:
21-
image: imiobe/iadelib:latest
21+
image: imiobe/iadelib:4.2.10
2222
command: zeoserver
2323
environment:
2424
- MOUNTPOINT=demo
@@ -36,7 +36,7 @@ services:
3636
# restart:
3737
# unless-stopped
3838
instance1:
39-
image: imiobe/iadelib:latest
39+
image: imiobe/iadelib:4.2.10
4040
command: instance
4141
ports:
4242
- "20081:8081"
@@ -63,7 +63,7 @@ services:
6363
labels:
6464
SERVICE_NAME: "instance1"
6565
instance2:
66-
image: imiobe/iadelib:latest
66+
image: imiobe/iadelib:4.2.10
6767
command: instance
6868
ports:
6969
- "20082:8081"
@@ -90,7 +90,7 @@ services:
9090
labels:
9191
SERVICE_NAME: "instance2"
9292
instance3:
93-
image: imiobe/iadelib:latest
93+
image: imiobe/iadelib:4.2.10
9494
command: instance
9595
ports:
9696
- "20083:8081"
@@ -119,7 +119,7 @@ services:
119119
# restart:
120120
# unless-stopped
121121
worker-cron:
122-
image: imiobe/iadelib:latest
122+
image: imiobe/iadelib:4.2.10
123123
command: instance-cron
124124
ports:
125125
- "8087:8087"
@@ -145,10 +145,10 @@ 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:
151-
image: imiobe/iadelib:latest
151+
image: imiobe/iadelib:4.2.10
152152
command: instance-async
153153
networks:
154154
- internal
@@ -174,7 +174,7 @@ services:
174174
# restart:
175175
# unless-stopped
176176
worker-amqp:
177-
image: imiobe/iadelib:latest
177+
image: imiobe/iadelib:4.2.10
178178
command: instance-amqp
179179
ports:
180180
- "20085:8286"
@@ -210,7 +210,7 @@ services:
210210
# restart:
211211
# unless-stopped
212212
maintenance:
213-
image: imiobe/iadelib:latest
213+
image: imiobe/iadelib:4.2.10
214214
command: maintenance
215215
ports:
216216
- "20089:8080"

docker/docker-entrypoint.sh

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,29 @@ function wait_for_cron() {
2727
echo "received response $response"
2828
done
2929
}
30+
function start() {
31+
echo "Starting $1"
32+
cmd="bin/$1"
33+
_stop() {
34+
echo "Forcing to stop"
35+
$cmd stop
36+
case "$cmd" in
37+
"bin/zeoserver")
38+
if [[ -f /data/filestorage/Data.fs.lock ]]; then
39+
kill -TERM "$(cat /data/filestorage/Data.fs.lock)" 2>/dev/null
40+
fi
41+
;;
42+
*)
43+
;;
44+
esac
45+
}
3046

47+
trap _stop SIGTERM SIGINT
48+
$cmd start
49+
# ensure file xists otherwise logtail returns 1
50+
touch "/data/log/$HOSTNAME.log"
51+
exec "$cmd" "logtail"
52+
}
3153

3254
setup "$1"
3355

@@ -41,7 +63,6 @@ case "$1" in
4163
exec "bash"
4264
;;
4365
*)
44-
echo "Starting $1"
45-
exec "bin/python" "bin/$1" "fg"
66+
start "$1"
4667
;;
4768
esac

0 commit comments

Comments
 (0)