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

Upgrades to rwp utility and repo CI/CD #91

Merged
merged 13 commits into from
Jun 17, 2024
Prev Previous commit
Next Next commit
Adjust Dockerfile, update actions to run on self-hosted runner
chocolatkey committed May 29, 2024
commit 2463a8487781d0bff0c976643b543949f94ac3a2
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ on:
jobs:

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

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

jobs:
release:
runs-on: ubuntu-latest
runs-on: [self-hosted, arm64]
steps:
- uses: actions/checkout@v4
with:
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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
@@ -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)