Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OERu
wenotes-docker
Commits
3e5d27e3
Commit
3e5d27e3
authored
Aug 08, 2017
by
Dave Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
attempted fix for options.json configuration for faye
parent
14859cad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
7 deletions
+21
-7
docker-faye/Dockerfile
docker-faye/Dockerfile
+1
-1
docker-faye/conf/run.sh
docker-faye/conf/run.sh
+20
-6
No files found.
docker-faye/Dockerfile
View file @
3e5d27e3
...
...
@@ -98,7 +98,7 @@ RUN chmod u+x /root/conf/*.sh
# expose relevant ports
EXPOSE
80
VOLUME
["/opt/wenotes", "/opt/wenotes/options.json"]
VOLUME
["/opt/wenotes
/server
", "/opt/wenotes/options.json"]
# First, say we're doing it
RUN
echo
"running run.sh - /root/conf/run.sh"
# Actually do it when we run the container.
...
...
docker-faye/conf/run.sh
View file @
3e5d27e3
...
...
@@ -5,7 +5,7 @@
# Run start script.
echo
"*****Running run.sh"
CONF
=
/root/conf
WENOTES
=
/opt/wenotes
WENOTES
=
/opt/wenotes
/server
CWD
=
`
pwd
`
# Defines
WESERVER
=
https://kiwilightweight@bitbucket.org/wikieducator/wenotes-server.git
...
...
@@ -48,7 +48,6 @@ if [ "$1" = 'faye' ]; then
echo
"getting
$WESERVER
, putting it into server"
$GIT
clone
$WESERVER
server
# next start various Javascript services
if
[[
-f
$CONF
/faye.yml
]]
;
then
echo
"moving to server"
...
...
@@ -58,14 +57,29 @@ if [ "$1" = 'faye' ]; then
cp
-a
$CONF
.
echo
"installing Node.JS dependencies"
$NPM
install
# this will be provided on the local filesystem, linked via a volume...
# $CP $CONF/options.json options.json
# if a phantom options.json *directory* has been created, remove it
if
[[
-d
options.json
]]
;
then
echo
"*** phantom options.json directory created - removing"
rmdir
options.json
if
[[
-d
options.json
]]
;
then
echo
"*** *** failed to remove the directory... "
fi
fi
# if the options.json file's not there, link it from $WENOTES
if
[[
!
-f
options.json
]]
;
then
echo
"no options.json found in
$WENOTES
/server..."
if
[[
-f
../options.json
]]
;
then
echo
"found options.json in .., linking here"
ln
-sf
../options.json
.
else
echo
"couldn't find options.json! This isn't going to work without manual intervention"
fi
fi
echo
"starting pm2 to supervise scripts in
$WENOTES
/server/conf/faye.yml"
$PM2
start
--no-daemon
conf/faye.yml
#$PM2 start $CONF/faye.yml
cd
$WENOTES
else
echo
"***looks like clone of wenotes-server failed - it's not in
$WENOTES
/server..."
echo
"***looks like clone of wenotes-server failed - it's not in
$WENOTES
/server..."
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment