diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..b1cea01840 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM centos:centos7 +MAINTAINER jamiesun + +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"] diff --git a/runclub b/runclub new file mode 100644 index 0000000000..631de0b2c0 --- /dev/null +++ b/runclub @@ -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