fix(docker): add dockfile and small fixes (#38)

* fix(docker): add dockfile and small fixes

* chore(readme): small fixes
This commit is contained in:
Hexxa 2021-02-01 21:36:56 +08:00 committed by GitHub
parent c8a3f911e8
commit b0d1cdccfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 126 additions and 36 deletions

16
Dockerfile Normal file
View file

@ -0,0 +1,16 @@
FROM golang:1.15 as build-be
ADD . /quickshare
WORKDIR /quickshare
RUN /quickshare/scripts/build_be_docker.sh
FROM node as build-fe
COPY --from=build-be /quickshare /quickshare
WORKDIR /quickshare
RUN yarn install \
&& yarn --cwd "src/client/web" run build \
&& cp -R /quickshare/public /quickshare/dist/quickshare
FROM gcr.io/distroless/base-debian10
COPY --from=build-fe /quickshare/dist/quickshare /quickshare
ADD configs/docker.yml /quickshare
CMD ["/quickshare/start", "-c", "/quickshare/docker.yml"]