From 8e8593596925c4142183592572030296e6f8ef32 Mon Sep 17 00:00:00 2001 From: WeebDataHoarder <57538841+WeebDataHoarder@users.noreply.github.com> Date: Tue, 7 Dec 2021 17:17:25 +0100 Subject: [PATCH] Add Dockerfile, change path, add drone build --- .drone.yml | 12 ++++++++++++ Dockerfile | 9 +++++++++ README.md | 4 +++- go.mod | 2 +- 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .drone.yml create mode 100644 Dockerfile diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..fd02f5b --- /dev/null +++ b/.drone.yml @@ -0,0 +1,12 @@ +--- +kind: pipeline +type: docker +name: default + +steps: + - name: backend + image: golang:1.17-bullseye + commands: + - go build -o srg . + +... diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9aa81b2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM golang:1.17-bullseye + +COPY . /src + +WORKDIR /src +RUN go build -o srg . && mv srg /usr/bin && rm -rf /src +WORKDIR / + +ENTRYPOINT ["/usr/bin/srg"] \ No newline at end of file diff --git a/README.md b/README.md index ee43d76..2171d0d 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,6 @@ Mass static file indexing via hashes To set a larger task limit (mind fdlimit): `$ go run . -tasklimit=128` -Output on stdout. Errors on stderr. \ No newline at end of file +Output on stdout. Errors on stderr. + +Build via `$ go build -o srg` \ No newline at end of file diff --git a/go.mod b/go.mod index cb10df7..daa9490 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module git.gammaspectra.live/S.O.N.G./SynchRoGazer +module git.gammaspectra.live/S.O.N.G/SynchRoGazer go 1.14