diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8e6bd4d..c26fd3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: [self-hosted, arm64] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 512688c..3ca9994 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ permissions: jobs: release: - runs-on: ubuntu-latest + runs-on: [self-hosted, arm64] steps: - uses: actions/checkout@v4 with: diff --git a/Dockerfile b/Dockerfile index a553861..b47dc6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,4 +47,4 @@ EXPOSE 15080 USER nonroot:nonroot ENTRYPOINT ["/opt/rwp"] -CMD ["serve", "/srv/publications"] \ No newline at end of file +CMD ["serve", "/srv/publications", "--address", "0.0.0.0"] \ No newline at end of file diff --git a/cmd/rwp/cmd/serve/router.go b/cmd/rwp/cmd/serve/router.go index fe7b402..e3b5fd1 100644 --- a/cmd/rwp/cmd/serve/router.go +++ b/cmd/rwp/cmd/serve/router.go @@ -11,6 +11,11 @@ import ( func (s *Server) Routes() *mux.Router { r := mux.NewRouter() + r.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + w.Write([]byte("OK")) + }) + if s.config.Debug { r.HandleFunc("/debug/pprof/", pprof.Index) r.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)