feat: add Docker support and Gitea publish workflow
All checks were successful
Build and Publish Docker Image / deploy (push) Successful in 1m38s

- Add a multi-stage Dockerfile for building and running the Go backend
- Add .dockerignore to optimize the Docker build context
- Create a Gitea Actions workflow to build and publish Docker images on tag push
- Register a new `/health` endpoint for container healthchecks
- Update README.md with Docker and Podman deployment instructions
- Ignore local `docker-compose.yml` in .gitignore
This commit is contained in:
2026-05-30 14:36:02 +03:00
parent 3471e2b0cf
commit 33d26804a0
8 changed files with 182 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
package handlers
import (
"net/http"
"net/http/httptest"
"testing"
)
func TestHealthRoutes(t *testing.T) {
app, cleanup := newTestApp(t)
defer cleanup()
mux := http.NewServeMux()
app.RegisterRoutes(mux)
for _, path := range []string{"/health", "/healthz", "/api/v1/health"} {
t.Run(path, func(t *testing.T) {
request := httptest.NewRequest(http.MethodGet, path, nil)
response := httptest.NewRecorder()
mux.ServeHTTP(response, request)
if response.Code != http.StatusOK {
t.Fatalf("status = %d, body = %s", response.Code, response.Body.String())
}
})
}
}