From 63bbd4610fc2a3cbd52f9c12d6732b3275e30293 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Tue, 17 May 2022 01:56:05 +0200 Subject: [PATCH] added docker stuff --- .dockerignore | 1 + Dockerfile | 21 +++++++++++++++++++++ docker-compose.yml | 18 ++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 120000 .dockerignore create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore new file mode 120000 index 0000000..3e4e48b --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.gitignore \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3ac6433 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM node as jsbuild + +ADD . /app +WORKDIR /app + +RUN make deps && make js + +FROM golang as gobuild + +ADD . /app +WORKDIR /app + +RUN make go + + +FROM gcr.io/distroless/base-debian10 + +COPY --from=gobuild /app/build/s3share /app/s3share +COPY --from=jsbuild /app/build/public /app/public + +ENTRYPOINT [ "/app/s3share" ] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..918e2a3 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,18 @@ +version: "3" + +services: + s3share: + build: . + image: djeeberjr/s3share + ports: + - "80:3000" + environment: + - S3_ENDPOINT=localhost:9000 + - S3_BUCKET=dev + - S3_ACCESS_KEY=dev + - S3_SECRET_KEY=hunter22 + - S3_DISABLE_SSL=true + - ADDRESS=:3000 + - API_USERNAME=admin + - API_PASSWORD=hunter2 + - DB_CONNECTION=dev:hunter22@localhost/dev