Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor #71

Draft
wants to merge 37 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
72e0118
start refactor
zyxkad Jun 11, 2024
e081599
refactoring cluster
zyxkad Jun 18, 2024
5e89ede
add socket logic
zyxkad Jun 20, 2024
103c480
migrated more cluster
zyxkad Jun 26, 2024
451a665
abstract subscription, token, and user api
zyxkad Jun 27, 2024
8cbd7c5
fix wrong jwt subject usage
zyxkad Jun 27, 2024
e17d8c7
fix format
zyxkad Jun 27, 2024
f2dbcbf
add permHandler
zyxkad Jun 28, 2024
b7b6cc6
complete api
zyxkad Jun 29, 2024
a498e11
go fmt
zyxkad Jul 1, 2024
0ab1240
Merge branch 'master' into refactor
zyxkad Aug 6, 2024
10eee06
update dockerfile
zyxkad Aug 6, 2024
8dca5cb
seperate config
zyxkad Aug 8, 2024
9d44901
fix notifier error
zyxkad Aug 8, 2024
caae4f7
add webhook
zyxkad Aug 8, 2024
74c811d
add license header to installer.sh
zyxkad Aug 9, 2024
18ee907
update cluster handler
zyxkad Aug 10, 2024
4fe7a79
start to reforge storage sync
zyxkad Aug 11, 2024
3c20fd8
run go fmt
zyxkad Aug 11, 2024
173aced
refactored most stuffs
zyxkad Aug 11, 2024
650b0c3
refactored all errors
zyxkad Aug 12, 2024
1d399d9
add gc
zyxkad Aug 13, 2024
e723847
fix certificate request logic
zyxkad Aug 13, 2024
5465766
add report API
zyxkad Aug 14, 2024
16e9db4
seperate runner
zyxkad Aug 17, 2024
88b902b
refactor file download
zyxkad Aug 17, 2024
8cf633b
fill more manager
zyxkad Aug 17, 2024
f2a883d
implemented singleUserManager
zyxkad Aug 17, 2024
a09e758
run go fmt
zyxkad Aug 17, 2024
29265d0
bump go version to 1.23
zyxkad Aug 17, 2024
d436d88
use report API
zyxkad Aug 17, 2024
8698d11
fix nil pointer config
zyxkad Aug 17, 2024
774a388
fix typo
zyxkad Aug 17, 2024
9308d58
fix http client
zyxkad Aug 17, 2024
0ec5189
fix report API, and a few translations
zyxkad Aug 18, 2024
07bf29d
fix unused import
zyxkad Aug 18, 2024
62c50ae
update config
zyxkad Oct 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# syntax=docker/dockerfile:1

ARG GO_VERSION=1.21
# Copyright (C) 2023 Kevin Z <zyxkad@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

ARG GO_VERSION=1.23
ARG REPO=github.com/LiterMC/go-openbmclapi
ARG NPM_DIR=dashboard

Expand All @@ -23,6 +37,7 @@ ARG NPM_DIR

WORKDIR "/go/src/${REPO}/"

ENV CGO_ENABLED=0
COPY ./go.mod ./go.sum "/go/src/${REPO}/"
RUN go mod download
COPY . "/go/src/${REPO}"
Expand All @@ -31,7 +46,7 @@ COPY --from=WEB_BUILD "/web/dist" "/go/src/${REPO}/${NPM_DIR}/dist"
ENV ldflags="-X 'github.com/LiterMC/go-openbmclapi/internal/build.BuildVersion=$TAG'"

RUN --mount=type=cache,target=/root/.cache/go-build \
CGO_ENABLED=0 go build -v -o "/go/bin/go-openbmclapi" -ldflags="$ldflags" "."
go build -v -o "/go/bin/go-openbmclapi" -ldflags="$ldflags" "."

FROM alpine:latest

Expand All @@ -40,4 +55,4 @@ COPY ./config.yaml /opt/openbmclapi/config.yaml

COPY --from=BUILD "/go/bin/go-openbmclapi" "/go-openbmclapi"

CMD ["/go-openbmclapi"]
ENTRYPOINT ["/go-openbmclapi"]
Loading
Loading