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
0645c5eb
Commit
0645c5eb
authored
Dec 21, 2016
by
Dave Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working Faye server, on 14.04
parent
8b83c03a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
46 deletions
+38
-46
docker-faye/Dockerfile
docker-faye/Dockerfile
+6
-23
docker-faye/conf/run.sh
docker-faye/conf/run.sh
+32
-23
No files found.
docker-faye/Dockerfile
View file @
0645c5eb
...
...
@@ -70,27 +70,13 @@ RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
&&
apt-get update
-y
-qq
# Download dev dependencies
RUN
apt-get
install
-y
--no-install-recommends
\
build-essential
\
# erlang-dev
\
# libcurl4-openssl-dev
\
# libicu-dev
\
# libmozjs185-dev
\
build-essential
\
# install nodejs stack...
&& apt-get install -y nodejs \
&& npm install -g grunt-cli
# set up pm2
RUN
npm
install
-g
pm2
# Cleanup build detritus
#RUN && apt-get purge -y \
# binutils \
# build-essential \
# cpp \
# erlang-dev \
# libicu-dev \
# make \
# perl \
RUN
apt-get autoremove
-y
&&
apt-get clean
# && apt-get install -y libicu52 --no-install-recommends
# Set up the language variables
ENV
LANG en_NZ.UTF-8
...
...
@@ -110,13 +96,10 @@ COPY ./conf /root/conf/
RUN
chmod
u+x /root/conf/
*
.sh
# expose relevant ports
EXPOSE
8380
# VOLUME ["/opt/wenotes"]
EXPOSE
80
VOLUME
["/opt/wenotes/server", "/opt/wenotes/server/options.json"]
# First, say we're doing it
RUN
echo
"running run.sh - /root/conf/run.sh"
# Actually do it.
RUN
/root/conf/run.sh
# Say we're finished
RUN
echo
"finished run.sh"
CMD
["/bin/bash"]
# Actually do it when we run the container.
ENTRYPOINT
["tini", "--", "/root/conf/run.sh"]
CMD
["faye"]
docker-faye/conf/run.sh
View file @
0645c5eb
...
...
@@ -31,34 +31,43 @@ if [[ -f $CONF/pre-install.sh ]] ; then
source
$CONF
/pre-install.sh
fi
echo
"
starting services
"
echo
"
arg 1 =
$1
"
# next, get the Javascript code:
# get the repo
echo
"moving to
$WENOTES
"
if
[[
!
-d
$WENOTES
]]
;
then
echo
"creating directory
$WENOTES
"
mkdir
-p
$WENOTES
fi
cd
$WENOTES
echo
"getting
$WESERVER
, putting it into server"
$GIT
clone
$WESERVER
server
if
[
"
$1
"
=
'faye'
]
;
then
echo
"starting services"
# next start various Javascript services
if
[[
-f
$CONF
/faye.yml
]]
;
then
echo
"moving to server"
cd
$WENOTES
/server
echo
"installing Node.JS dependencies"
$NPM
install
$CP
$CONF
/options.json options.json
echo
"starting pm2 to supervise scripts in
$CONF
/faye.yml"
$PM2
start
--no-daemon
$CONF
/faye.yml
# next, get the Javascript code:
# get the repo
echo
"moving to
$WENOTES
"
if
[[
!
-d
$WENOTES
]]
;
then
echo
"creating directory
$WENOTES
"
mkdir
-p
$WENOTES
fi
cd
$WENOTES
fi
echo
"getting
$WESERVER
, putting it into server"
$GIT
clone
$WESERVER
server
echo
"returning to original dir:
$CWD
"
cd
$CWD
# next start various Javascript services
if
[[
-f
$CONF
/faye.yml
]]
;
then
echo
"moving to server"
cd
$WENOTES
/server
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
echo
"starting pm2 to supervise scripts in
$CONF
/faye.yml"
$PM2
start
--no-daemon
$CONF
/faye.yml
#$PM2 start $CONF/faye.yml
cd
$WENOTES
fi
echo
"returning to original dir:
$CWD
"
cd
$CWD
else
echo
"no-op!"
fi
echo
"finished services"
...
...
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