add dockerfile #14

Merged
cws merged 1 commits from dockerize into master 2019-11-17 16:52:54 +00:00
2 changed files with 8635 additions and 0 deletions
Showing only changes of commit def6e6f24f - Show all commits

34
docker/Dockerfile Normal file
View File

@ -0,0 +1,34 @@
FROM alpine:edge
RUN apk add --no-cache git
RUN apk add --no-cache musl-dev
RUN apk add --no-cache gcc
RUN apk add --no-cache sqlite
RUN apk add --no-cache go
RUN apk add --no-cache make
RUN apk add --no-cache npm
RUN apk add --no-cache yarn
VOLUME /app/var
EXPOSE 5673
ARG gomaxprocs="8"
WORKDIR /app
ENV SRC_DIR=/app/src/
ENV GOMAXPROCS=${gomaxprocs}
RUN git clone https://code.chrissexton.org/cws/cabinet.git $SRC_DIR
RUN apk add --no-cache tzdata
ENV TZ America/New_York
# RUN yarn global add @vue/cli
RUN cd $SRC_DIR/frontend; yarn && yarn build
RUN go get -u github.com/gobuffalo/packr/v2/packr2
RUN cd $SRC_DIR; $HOME/go/bin/packr2
RUN cd $SRC_DIR; go get ./...; go build -o /app/cabinet
ENTRYPOINT ["/app/cabinet", "-httpAddr=0.0.0.0:5673", "-db=/app/var/cabinet.db"]

8601
frontend/yarn.lock Normal file

File diff suppressed because it is too large Load Diff