Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xpub-epmc
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Literature-services
public-projects
xpub-epmc
Commits
40f47020
Commit
40f47020
authored
5 years ago
by
Yuci Gou
Browse files
Options
Downloads
Patches
Plain Diff
Reinstate initialization sequence of the ftp monitors
parent
b84eac59
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!116
Shared data model
,
!117
Dev
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
pm2.ftp.config.js
+2
-6
2 additions, 6 deletions
pm2.ftp.config.js
pm2.pubsweet.config.js
+12
-0
12 additions, 0 deletions
pm2.pubsweet.config.js
post_init.sh
+3
-6
3 additions, 6 deletions
post_init.sh
wrapperScript.sh
+20
-5
20 additions, 5 deletions
wrapperScript.sh
with
37 additions
and
17 deletions
pm2.config.js
→
pm2.
ftp.
config.js
+
2
−
6
View file @
40f47020
const
pm2Config
=
{
apps
:
[
{
name
:
'
pubsweet
'
,
script
:
'
./node_modules/pubsweet/src/startup/start.js
'
,
exec_mode
:
'
cluster_mode
'
,
instances
:
1
,
},
{
name
:
'
ftpBulkMonitor
'
,
script
:
'
./server/ftp-integration/api.js
'
,
exec_mode
:
'
cluster_mode
'
,
instances
:
1
,
},
{
name
:
'
ftpTaggerMonitor
'
,
script
:
'
./server/ftp-integration/taggedXML.js
'
,
exec_mode
:
'
cluster_mode
'
,
instances
:
1
,
},
],
...
...
This diff is collapsed.
Click to expand it.
pm2.pubsweet.config.js
0 → 100644
+
12
−
0
View file @
40f47020
const
pm2Config
=
{
apps
:
[
{
name
:
'
pubsweet
'
,
script
:
'
./node_modules/pubsweet/src/startup/start.js
'
,
exec_mode
:
'
cluster_mode
'
,
instances
:
1
,
},
],
}
module
.
exports
=
pm2Config
This diff is collapsed.
Click to expand it.
post_init.sh
+
3
−
6
View file @
40f47020
...
...
@@ -5,11 +5,8 @@ echo "Running cron service"
env
|
cat
- /etc/cron.d/crontab
>
temp
&&
crontab temp
service cron start
echo
"Running ftp upload monitors"
pm2 start pm2.ftp.config.js
echo
"Running Seed"
yarn seed
This diff is collapsed.
Click to expand it.
wrapperScript.sh
+
20
−
5
View file @
40f47020
#!/bin/bash
echo
"Running server in the background"
cmd
=
"pm2 start pm2.config.js"
cmd
=
"pm2 start pm2.
pubsweet.
config.js"
$cmd
&
sleep
30
echo
"Wait up to 3 minutes for server to respond, check every 20 seconds"
COUNTER
=
0
while
[
$COUNTER
-lt
15
]
;
do
echo
"Running post_init.sh script"
./post_init.sh
RUNNING
=
$(
curl
--silent
--connect-timeout
20
"
$PUBSWEET_URL
"
|
grep
"/assets/"
)
if
[
-n
"
$RUNNING
"
]
;
then
echo
"xPub is running"
#echo "Creating the Users"
#node scripts/adduser.js rakeshnambiar rakeshnbr@ebi.ac.uk Password_01 false
echo
"Running post_init.sh script"
./post_init.sh
tail
-f
/dev/null
fi
echo
"Waiting for xPub..."
sleep
20
let
COUNTER
=
COUNTER+1
done
echo
"ERROR: xPub is not running"
echo
"Initialization completed. PubSweet up running..."
tail
-f
/dev/null
This diff is collapsed.
Click to expand it.
Preview
0%
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