Skip to content

Commit

Permalink
Adjust Dockerfile, update actions to run on self-hosted runner
Browse files Browse the repository at this point in the history
  • Loading branch information
chocolatkey committed May 29, 2024
1 parent 1b3743b commit 2463a84
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:

build:
runs-on: ubuntu-latest
runs-on: [self-hosted, arm64]
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:

jobs:
release:
runs-on: ubuntu-latest
runs-on: [self-hosted, arm64]
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ EXPOSE 15080
USER nonroot:nonroot

ENTRYPOINT ["/opt/rwp"]
CMD ["serve", "/srv/publications"]
CMD ["serve", "/srv/publications", "--address", "0.0.0.0"]
5 changes: 5 additions & 0 deletions cmd/rwp/cmd/serve/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2463a84

Please sign in to comment.