Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM centos:centos7
MAINTAINER jamiesun <[email protected]>

VOLUME [ "/etc/nodeclub" ]

RUN yum update -y
RUN yum install -y epel-release
RUN yum install -y gcc make git nodejs npm openssl openssl-devel zip unzip libjpeg-devel libpng-devel
RUN yum clean all

RUN npm install -g n && n stable

RUN git clone -b master https://github.com/cnodejs/nodeclub.git /opt/nodeclub
RUN cd /opt/nodeclub && make install && make build

ADD runclub /usr/local/bin/runclub
RUN chmod +x /usr/local/bin/runclub

EXPOSE 3000

CMD ["/usr/local/bin/runclub"]
9 changes: 9 additions & 0 deletions runclub
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

cd /opt/nodeclub

git pull origin master

test -f /opt/nodeclub/config.js || cp /etc/nodeclub/config.js /opt/nodeclub/config.js

node app.js