Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
Merge branch 'feature/docker-file' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
bluemir committed Apr 5, 2016
2 parents 0bd9c99 + 7e977c3 commit 8265a26
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
6 changes: 2 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ RUN git clone --depth 1 https://github.com/bluemir/wikinote.git src && rm -rf sr

WORKDIR /wikinote/src
#RUN
RUN ["/bin/bash", "--login", "-c", "npm install"]
RUN npm install

##configuration
ADD local.yaml /wikinote/src/config/

COPY entry.sh /wikinote/src/

VOLUME ["/wikinote/data"]

EXPOSE 4000
CMD ["/bin/bash", "--login", "-c", "./entry.sh"]
CMD ["./entry.sh"]

19 changes: 16 additions & 3 deletions docker/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,22 @@ if [ ! -d /wikinote/data/.git ]; then
git init && \
git config user.name anonymous && \
git config user.email anonymous@wikinote && \
git commit -m "Initial commit" --allow-empty
git commit -m "Initial commit" --allow-empty && \
echo ".app/" >> .gitignore
fi

cd /wikinote/src && \
node wikinote.js
if [ ! -f /wikinote/data/.app/config.yaml ]; then
cd /wikinote/src && \
node wikinote.js \
--port 4000 \
--wikinote-path /wikinote/data \
--wikiname WikiNote \
--front-page front-page \
--save
else
cd /wikinote/src && \
node wikinote.js \
--port 4000 \
--wikinote-path /wikinote/data
fi

4 changes: 0 additions & 4 deletions docker/local.yaml

This file was deleted.

0 comments on commit 8265a26

Please sign in to comment.