Docker for MongoDB and WebUI recommended by Issue (#16)

This commit is contained in:
Sukchan Lee 2018-02-17 14:47:06 +09:00
parent f915820f3a
commit 2d72eaa24d
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,21 @@
version: '3'
services:
webui:
build: ./webui
ports:
- "3000:3000"
depends_on:
- mongodb
environment:
DB_URI: mongodb://mongodb/nextepc
mongodb:
image: mongo
ports:
- "27017:27017"
volumes:
- db-data:/data/db
volumes:
db-data:

View File

@ -0,0 +1,20 @@
FROM node:carbon
ENV PACKAGE nextepc
ENV VERSION 0.3.3
RUN apt-get -y install curl
RUN set -e; \
cd /usr/src; \
rm -rf ./$PACKAGE; \
curl -SLO "https://github.com/acetcom/$PACKAGE/archive/v$VERSION.tar.gz"; \
tar -xvf v$VERSION.tar.gz; \
mv ./$PACKAGE-$VERSION/ ./$PACKAGE;
WORKDIR /usr/src/nextepc/webui
RUN npm install && \
npm run build
CMD npm run start
EXPOSE 3000