Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
clarin-dspace
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
commul
docker
clarin-dspace
Commits
d78a0dd5
Verified
Commit
d78a0dd5
authored
4 years ago
by
egon w. stemle
Browse files
Options
Downloads
Patches
Plain Diff
Avoid tomcat start/kill/restart-cycle at startup
parent
3ee5825f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
dockerfiles/commul-customization/entrypoint.sh
+26
-37
26 additions, 37 deletions
dockerfiles/commul-customization/entrypoint.sh
with
27 additions
and
37 deletions
CHANGELOG.md
+
1
−
0
View file @
d78a0dd5
...
...
@@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-
Use dsapce-app image 2020.02.1:1.0
-
Rm apt cache after apt-get update+install
-
Rebuild Postgres image with latest 9.6
-
Avoid tomcat start/kill/restart-cycle at startup
### Fixed
-
#60
...
...
This diff is collapsed.
Click to expand it.
dockerfiles/commul-customization/entrypoint.sh
+
26
−
37
View file @
d78a0dd5
...
...
@@ -15,44 +15,33 @@ perl -pi -e 's/\$\{HANDLE_USER\}/$ENV{HANDLE_USER}/; s/\$\{HANDLE_PASSWORD\}/$EN
# initialize statistics & co
cd
/opt/repository/workspace/scripts
make init_statistics
/opt/tomcat8/bin/catalina.sh start
# wait for tomcat to start...
sleep
120
# https://ubuntuforums.org/showthread.php?t=979694
# Start process in the background and send its output to file descriptor 3
exec
3< <
(
while
(
true
)
;
do
set
-x
LOGID
=
$((
(
LOGID+1
)
%
5
))
LOG
=
"/tmp/entrypoint.log.
$LOGID
"
echo
"
$LOG
"
>
$LOG
timeout
-k
30 300 make update_oai |
tee
-a
$LOG
timeout
-k
30 300 make update_statistics |
tee
-a
$LOG
timeout
-k
30 300 make update_sitemap |
tee
-a
$LOG
timeout
-k
30 300 make lift_embargos |
tee
-a
$LOG
timeout
-k
30 300 make update_openaire_cache |
tee
-a
$LOG
timeout
-k
30 300 make update_discovery |
tee
-a
$LOG
timeout
-k
30 300 make send_info |
tee
-a
$LOG
date
>>
$LOG
echo
"INIT DONE."
wget https://healthchecks.local.iiegn.eu/ping/24a81cdc-2906-4faa-89b3-0d57541abef6
-T
10
-t
5
-O
/dev/null
set
+x
sleep
86400
done
)
# Read the output of the process line by line until one line contains Ready
while
read
line
;
do
case
"
$line
"
in
"INIT DONE."
)
break
;;
esac
done
<&3
# Close the file descriptor
exec
<&3 3<&-
/opt/tomcat8/bin/catalina.sh stop
-force
# Start cron job in the background
cron_hack
(){
INIT
=
"false"
while
(
true
)
;
do
# the first time, wait for tomcat to start...
[
"
$INIT
"
=
"false"
]
&&
sleep
300
&&
INIT
=
"true"
set
-x
LOGID
=
$((
(
LOGID+1
)
%
5
))
LOG
=
"/tmp/entrypoint.log.
$LOGID
"
echo
"
$LOG
"
>
$LOG
timeout
-k
30 300 make update_oai |
tee
-a
$LOG
timeout
-k
30 300 make update_statistics |
tee
-a
$LOG
timeout
-k
30 300 make update_sitemap |
tee
-a
$LOG
timeout
-k
30 300 make lift_embargos |
tee
-a
$LOG
timeout
-k
30 300 make update_openaire_cache |
tee
-a
$LOG
timeout
-k
30 300 make update_discovery |
tee
-a
$LOG
timeout
-k
30 300 make send_info |
tee
-a
$LOG
date
>>
$LOG
echo
"INIT DONE."
wget https://healthchecks.local.iiegn.eu/ping/24a81cdc-2906-4faa-89b3-0d57541abef6
-T
10
-t
5
-O
/dev/null
set
+x
sleep
86400
done
}
cron_hack &
# start tomcat
/opt/tomcat8/bin/catalina.sh run
This diff is collapsed.
Click to expand it.
egon w. stemle
@egon.stemle
mentioned in commit
8986af47
·
4 years ago
mentioned in commit
8986af47
mentioned in commit 8986af47bc0ab0c731feaedaaaefd2ef375547fd
Toggle commit list
egon w. stemle
@egon.stemle
mentioned in commit
34c82519
·
4 years ago
mentioned in commit
34c82519
mentioned in commit 34c825191466a688aa651cd5c5a9f2b1271ffa04
Toggle commit list
egon w. stemle
@egon.stemle
mentioned in commit
3d10ef28
·
4 years ago
mentioned in commit
3d10ef28
mentioned in commit 3d10ef288ed3d8c6205d958613f8dce66f33b508
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment