Skip to content

Commit d213056

Browse files
committed
[DEL] cron instances in docker manifests
1 parent c078ddd commit d213056

File tree

3 files changed

+87
-87
lines changed

3 files changed

+87
-87
lines changed

docker/docker-compose-dev.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ services:
4343
depends_on:
4444
- zeo
4545
- libreoffice
46-
- worker-cron
46+
# - worker-cron
4747
environment:
4848
- ZEO_CLIENT_CACHE_SIZE=1000MB
4949
- ZODB_CACHE_SIZE=100000
@@ -58,32 +58,32 @@ services:
5858
test: "curl -f localhost:8081/$$PLONE_PATH/@@ok"
5959
labels:
6060
SERVICE_NAME: "instance1"
61-
worker-cron:
62-
image: imiobe/iadelib:dev
63-
command: instance-cron
64-
ports:
65-
- "8087:8087"
66-
networks:
67-
- delib_internal
68-
- delib_external
69-
depends_on:
70-
- zeo
71-
environment:
72-
- ZEO_CLIENT_CACHE_SIZE=1000MB
73-
- ZODB_CACHE_SIZE=100000
74-
- ADMIN_PASSWORD=test
75-
- PUBLIC_URL=http://localhost/PM
76-
- PLONE_PATH=demo
77-
- CLUSTER=iadelib_pm42
78-
- HOSTNAME=worker-cron
79-
volumes:
80-
- ./data/:/data
81-
- tmp:/tmp
82-
- vartmp:/var/tmp
83-
healthcheck:
84-
test: "curl -f localhost:8087/$$PLONE_PATH/@@ok"
85-
labels:
86-
SERVICE_NAME: "worker-cron"
61+
# worker-cron:
62+
# image: imiobe/iadelib:dev
63+
# command: instance-cron
64+
# ports:
65+
# - "8087:8087"
66+
# networks:
67+
# - delib_internal
68+
# - delib_external
69+
# depends_on:
70+
# - zeo
71+
# environment:
72+
# - ZEO_CLIENT_CACHE_SIZE=1000MB
73+
# - ZODB_CACHE_SIZE=100000
74+
# - ADMIN_PASSWORD=test
75+
# - PUBLIC_URL=http://localhost/PM
76+
# - PLONE_PATH=demo
77+
# - CLUSTER=iadelib_pm42
78+
# - HOSTNAME=worker-cron
79+
# volumes:
80+
# - ./data/:/data
81+
# - tmp:/tmp
82+
# - vartmp:/var/tmp
83+
# healthcheck:
84+
# test: "curl -f localhost:8087/$$PLONE_PATH/@@ok"
85+
# labels:
86+
# SERVICE_NAME: "worker-cron"
8787
worker-async:
8888
image: imiobe/iadelib:dev
8989
command: instance-async
@@ -92,7 +92,7 @@ services:
9292
depends_on:
9393
- zeo
9494
- libreoffice
95-
- worker-cron
95+
# - worker-cron
9696
environment:
9797
- ZEO_CLIENT_CACHE_SIZE=1000MB
9898
- ZODB_CACHE_SIZE=100000

docker/docker-compose.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ services:
4646
depends_on:
4747
- zeo
4848
- libreoffice
49-
- worker-cron
49+
# - worker-cron
5050
environment:
5151
- ZEO_CLIENT_CACHE_SIZE=1000MB
5252
- ZODB_CACHE_SIZE=100000
@@ -62,32 +62,32 @@ services:
6262
labels:
6363
SERVICE_NAME: "instance1"
6464

65-
worker-cron:
66-
image: imiobe/iadelib:latest
67-
command: instance-cron
68-
ports:
69-
- "8087:8087"
70-
networks:
71-
- delib_internal
72-
- delib_external
73-
depends_on:
74-
- zeo
75-
environment:
76-
- ZEO_CLIENT_CACHE_SIZE=1000MB
77-
- ZODB_CACHE_SIZE=100000
78-
- ADMIN_PASSWORD=test
79-
- PUBLIC_URL=http://localhost/PM
80-
- PLONE_PATH=demo
81-
- CLUSTER=iadelib_pm42
82-
- HOSTNAME=worker-cron
83-
volumes:
84-
- ./data:/data
85-
- tmp:/tmp
86-
- vartmp:/var/tmp
87-
healthcheck:
88-
test: "curl -f localhost:8087/$$PLONE_PATH/@@ok"
89-
labels:
90-
SERVICE_NAME: "worker-cron"
65+
# worker-cron:
66+
# image: imiobe/iadelib:latest
67+
# command: instance-cron
68+
# ports:
69+
# - "8087:8087"
70+
# networks:
71+
# - delib_internal
72+
# - delib_external
73+
# depends_on:
74+
# - zeo
75+
# environment:
76+
# - ZEO_CLIENT_CACHE_SIZE=1000MB
77+
# - ZODB_CACHE_SIZE=100000
78+
# - ADMIN_PASSWORD=test
79+
# - PUBLIC_URL=http://localhost/PM
80+
# - PLONE_PATH=demo
81+
# - CLUSTER=iadelib_pm42
82+
# - HOSTNAME=worker-cron
83+
# volumes:
84+
# - ./data:/data
85+
# - tmp:/tmp
86+
# - vartmp:/var/tmp
87+
# healthcheck:
88+
# test: "curl -f localhost:8087/$$PLONE_PATH/@@ok"
89+
# labels:
90+
# SERVICE_NAME: "worker-cron"
9191

9292
worker-async:
9393
image: imiobe/iadelib:latest
@@ -122,7 +122,7 @@ services:
122122
- delib_external
123123
depends_on:
124124
- zeo
125-
- worker-cron
125+
# - worker-cron
126126
environment:
127127
- ZEO_CLIENT_CACHE_SIZE=1000MB
128128
- ZODB_CACHE_SIZE=100000
@@ -144,7 +144,7 @@ services:
144144
- tmp:/tmp
145145
- vartmp:/var/tmp
146146
labels:
147-
SERVICE_NAME: "worker-cron"
147+
SERVICE_NAME: "worker-amqp"
148148

149149
maintenance:
150150
image: imiobe/iadelib:latest
@@ -156,7 +156,7 @@ services:
156156
depends_on:
157157
- zeo
158158
- libreoffice
159-
- worker-cron
159+
# - worker-cron
160160
environment:
161161
- ZEO_CLIENT_CACHE_SIZE=1000MB
162162
- ZODB_CACHE_SIZE=100000

docker/docker-entrypoint.sh

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,31 @@ function setup() {
1010
fi
1111
chmod 777 /data/*
1212
}
13-
function wait_for_cron() {
14-
echo "Waiting for cron"
15-
URL="worker-cron:8087/$PLONE_PATH"
16-
CURL="curl --write-out %{http_code} -so /dev/null $URL/@@ok"
17-
MAX_TRIES=50
18-
INTERVAL=5
19-
set +e
20-
SECONDS=0
21-
response="404"
22-
tries=0
23-
while [[ $response != "200" && $tries -lt $MAX_TRIES ]]
24-
do
25-
sleep $INTERVAL
26-
echo "Waiting for cron"
27-
response=$($CURL)
28-
((tries+=1))
29-
done
30-
set -e
31-
if [[ $tries == "$MAX_TRIES" ]]; then
32-
echo "Failed to reach $URL after $SECONDS s"
33-
exit 1
34-
else
35-
echo "$URL is up. Waited $SECONDS s"
36-
fi
37-
}
13+
# function wait_for_cron() {
14+
# echo "Waiting for cron"
15+
# URL="worker-cron:8087/$PLONE_PATH"
16+
# CURL="curl --write-out %{http_code} -so /dev/null $URL/@@ok"
17+
# MAX_TRIES=50
18+
# INTERVAL=5
19+
# set +e
20+
# SECONDS=0
21+
# response="404"
22+
# tries=0
23+
# while [[ $response != "200" && $tries -lt $MAX_TRIES ]]
24+
# do
25+
# sleep $INTERVAL
26+
# echo "Waiting for cron"
27+
# response=$($CURL)
28+
# ((tries+=1))
29+
# done
30+
# set -e
31+
# if [[ $tries == "$MAX_TRIES" ]]; then
32+
# echo "Failed to reach $URL after $SECONDS s"
33+
# exit 1
34+
# else
35+
# echo "$URL is up. Waited $SECONDS s"
36+
# fi
37+
# }
3838
function start() {
3939
echo "Starting $1"
4040
cmd="bin/$1"
@@ -61,10 +61,10 @@ function start() {
6161

6262
setup "$1"
6363

64-
PRIORIY="instance-cron instance-debug maintenance script zeoserver"
65-
if [[ "instance" == "$1" || ( ! $PRIORIY == *"$1"* && $# -gt 0 ) ]]; then
66-
wait_for_cron "$1"
67-
fi
64+
#PRIORIY="instance-cron instance-debug maintenance script zeoserver"
65+
#if [[ "instance" == "$1" || ( ! $PRIORIY == *"$1"* && $# -gt 0 ) ]]; then
66+
# wait_for_cron "$1"
67+
#fi
6868

6969
case "$1" in
7070
"")

0 commit comments

Comments
 (0)