summaryrefslogtreecommitdiffstats
path: root/Services/nodejs/Dockerfile
diff options
context:
space:
mode:
authorstartxfr <clarue@startx.fr>2015-11-29 04:45:26 +0100
committerstartxfr <clarue@startx.fr>2015-11-29 04:45:26 +0100
commiteb3d88b10a0feb302a9fd1ec60a7a92caebb856c (patch)
treed5505c96ddd69b6c47cd00bb77f8de0b15012720 /Services/nodejs/Dockerfile
parent78d1d5017e8acbc8b4bb7f0f567d10f0e47a75df (diff)
downloadphpmyadmin-eb3d88b10a0feb302a9fd1ec60a7a92caebb856c.tar.gz
phpmyadmin-eb3d88b10a0feb302a9fd1ec60a7a92caebb856c.tar.bz2
phpmyadmin-eb3d88b10a0feb302a9fd1ec60a7a92caebb856c.tar.xz
phpmyadmin-eb3d88b10a0feb302a9fd1ec60a7a92caebb856c.zip
start reshaping nodejs service
Diffstat (limited to 'Services/nodejs/Dockerfile')
-rw-r--r--Services/nodejs/Dockerfile27
1 files changed, 18 insertions, 9 deletions
diff --git a/Services/nodejs/Dockerfile b/Services/nodejs/Dockerfile
index dc20d72..2113c64 100644
--- a/Services/nodejs/Dockerfile
+++ b/Services/nodejs/Dockerfile
@@ -1,12 +1,21 @@
FROM startx/fedora
MAINTAINER Christophe LARUE <dev@startx.fr>
-RUN dnf -y install nodejs npm python make gcc \
- && dnf clean all \
- && mkdir -p /app \
- && chmod ug+rx /app
-VOLUME ["/app"]
-WORKDIR /app
-COPY app /app
-ENV MAIN_APP /app/app.js
-ENV NODE_PATH /app/node_modules
+USER root
+RUN dnf -y install nodejs npm python make gcc && \
+ dnf clean all
+ENV STARTUPLOG=/data/logs/nodejs/startup.log \
+ LOG_PATH=/data/logs/nodejs \
+ APP_PATH=/data/nodejs \
+ APP_MAIN=/data/nodejs/app.js
+COPY *.sh /bin/
+RUN chmod 775 /bin/run.sh && \
+ mkdir -p $APP_PATH && \
+ mkdir -p $LOG_PATH && \
+ touch $STARTUPLOG
+COPY ./ $APP_PATH
+RUN rm -f $APP_PATH/Dockerfile $APP_PATH/README.md $APP_PATH/run.sh $APP_PATH/docker-compose.yml
+
+EXPOSE 8000
+VOLUME [$APP_PATH,$LOG_PATH]
+CMD ["/bin/run.sh"] \ No newline at end of file