Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
keeleliin
keeleliin-wrapper
Commits
bb02ec2a
Commit
bb02ec2a
authored
Nov 04, 2015
by
priit
Browse files
Dockeri alge
parent
c8f0cc64
Changes
3
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
bb02ec2a
# docker build -t kl_wrapper .
# docker run --name kl_redis --rm --restart=no redis
# docker run --name kl_wrapper -d --link kl_redis:redis -p 3000:3000 -v /wrapper/concat:/
src
kl_wrapper
# docker run --name kl_wrapper -d --link kl_redis:redis -p 3000:3000 -v /wrapper/concat
/
:/
config
kl_wrapper
# docker kill kl_wrapper
# docker rm kl_wrapper
#
...
...
@@ -15,13 +15,17 @@ RUN apt-get update && \
RUN
npm
install
-g
forever
RUN
mkdir
-p
/src
RUN
cd
/src
&&
git clone
'https://github.com/BitWeb/keeleliin-wrapper-service.git'
.
&&
echo
"Git is cloned 2"
RUN
cd
/src
&&
npm
install
&&
echo
"NPM is installed 1"
RUN
mkdir
-p
/src
&&
mkdir
-p
/config
&&
\
cd
/src
&&
\
git clone
'https://github.com/BitWeb/keeleliin-wrapper-service.git'
.
&&
\
npm
install
&&
\
pwd
&&
\
ls
-la
&&
\
echo
"NPM is installed 1"
#Expose port
EXPOSE
3000
VOLUME
["/
src
"]
VOLUME
["/
config
"]
CMD
/./src/docker_start.sh
\ No newline at end of file
docker_start.sh
View file @
bb02ec2a
#!/bin/bash
cp
-R
-u
-p
/src/config_dist.js /config/config.js
if
[
-f
/config/config.js
]
;
then
cp
/config/config.js /src/config.js
fi
if
[
!
-f
/src/config.js
]
;
then
cp
-R
-u
-p
/src/config_dist.js /src/config.js
fi
...
...
docker_update.sh
View file @
bb02ec2a
...
...
@@ -4,6 +4,10 @@ cd /src
git pull
npm
install
if
[
-f
/config/config.js
]
;
then
cp
/config/config.js /src/config.js
fi
forever stopall
forever /src/app.js
forever list
\ No newline at end of file
Write
Preview
Supports
Markdown
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