add changes from v0.3

This commit is contained in:
JJ Kasper
2018-11-24 00:23:32 -06:00
parent 73f05ce4a3
commit 111cf2ed35
133 changed files with 10768 additions and 7443 deletions

View File

@@ -1,23 +1,30 @@
FROM node:8-alpine
RUN apk add yarn git bash s6
# install build stuff ( make python2 g++ ) for bcrypt since
# alpine linux doesn't have pre-built bcrypt
RUN apk add git bash s6 make python2 g++
RUN mkdir -p /opt/mykb
# install node_modules to tmp so it can be cached
RUN mkdir -p /tmp/mykb
COPY package.json /tmp/mykb
RUN cd /tmp/mykb && yarn
RUN cd /tmp/mykb && npm install
RUN mv /tmp/mykb/node_modules /opt/mykb/
COPY . /opt/mykb
RUN cd /opt/mykb && yarn build
RUN cd /opt/mykb && npm run build
RUN cd /opt/mykb && npm prune --production
RUN npm cache clean --force
# remove packages from building bcrypt
RUN apk del make python2 g++
COPY docker_startup.sh /mykb
RUN chmod +x /mykb
VOLUME /kb /db /config
VOLUME /kb /config
EXPOSE 3030
EXPOSE 3000
ARG GIT_NAME=mykb
ARG GIT_EMAIL=mykb@localhost