mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-19 20:32:35 +02:00

* implement OIDC middleware * auth code cleanup * allow override allowed_user in middleware, fix typos * fix tests and callbackURL * update next release docs * fix OIDC middleware not working with Authentik * feat: add groups support for OIDC claims (#41) Allow users to specify allowed groups in the env and use it to inspect the claims. This performs a logical AND of users and groups (additive). * merge feat/oidc-middleware (#49) * api: enrich provider statistifcs * fix: docker monitor now uses container status * Feat/auto schemas (#48) * use auto generated schemas * go version bump and dependencies upgrade * clarify some error messages --------- Co-authored-by: yusing <yusing@6uo.me> * cleanup some loadbalancer code * api: cleanup websocket code * api: add /v1/health/ws for health bubbles on dashboard * feat: experimental memory logger and logs api for WebUI --------- Co-authored-by: yusing <yusing@6uo.me> --------- Co-authored-by: yusing <yusing@6uo.me> Co-authored-by: Peter Olds <peter@olds.co>
97 lines
No EOL
2.3 KiB
Makefile
Executable file
97 lines
No EOL
2.3 KiB
Makefile
Executable file
VERSION ?= $(shell git describe --tags --abbrev=0)
|
|
BUILD_FLAGS ?= -s -w
|
|
BUILD_DATE ?= $(shell date -u +'%Y%m%d-%H%M')
|
|
export VERSION
|
|
export BUILD_FLAGS
|
|
export CGO_ENABLED = 0
|
|
export GOOS = linux
|
|
|
|
.PHONY: all setup build test up restart logs get debug run archive repush rapid-crash debug-list-containers
|
|
|
|
all: debug
|
|
|
|
build:
|
|
scripts/build.sh
|
|
|
|
test:
|
|
GODOXY_TEST=1 go test ./internal/...
|
|
|
|
up:
|
|
docker compose up -d
|
|
|
|
restart:
|
|
docker compose restart -t 0
|
|
|
|
logs:
|
|
docker compose logs -f
|
|
|
|
get:
|
|
go get -u ./cmd && go mod tidy
|
|
|
|
debug:
|
|
GODOXY_DEBUG=1 BUILD_FLAGS="" make run
|
|
|
|
debug-trace:
|
|
GODOXY_TRACE=1 make debug
|
|
|
|
profile:
|
|
GODEBUG=gctrace=1 make debug
|
|
|
|
run: build
|
|
sudo setcap CAP_NET_BIND_SERVICE=+eip bin/godoxy
|
|
[ -f .env ] && godotenv -f .env bin/godoxy || bin/godoxy
|
|
|
|
mtrace:
|
|
bin/godoxy debug-ls-mtrace > mtrace.json
|
|
|
|
rapid-crash:
|
|
sudo docker run --restart=always --name test_crash -p 80 debian:bookworm-slim /bin/cat &&\
|
|
sleep 3 &&\
|
|
sudo docker rm -f test_crash
|
|
|
|
debug-list-containers:
|
|
bash -c 'echo -e "GET /containers/json HTTP/1.0\r\n" | sudo netcat -U /var/run/docker.sock | tail -n +9 | jq'
|
|
|
|
ci-test:
|
|
mkdir -p /tmp/artifacts
|
|
act -n --artifact-server-path /tmp/artifacts -s GITHUB_TOKEN="$$(gh auth token)"
|
|
|
|
cloc:
|
|
cloc --not-match-f '_test.go$$' cmd internal pkg
|
|
|
|
push-docker-io:
|
|
BUILDER=build docker buildx build \
|
|
--platform linux/arm64,linux/amd64 \
|
|
-f Dockerfile \
|
|
-t docker.io/yusing/godoxy-nightly \
|
|
-t docker.io/yusing/godoxy-nightly:${VERSION}-${BUILD_DATE} \
|
|
--build-arg VERSION="${VERSION}-nightly-${BUILD_DATE}" \
|
|
--push .
|
|
|
|
build-docker:
|
|
docker build -t godoxy-nightly \
|
|
--build-arg VERSION="${VERSION}-nightly-${BUILD_DATE}" .
|
|
|
|
gen-schema-single:
|
|
typescript-json-schema --noExtraProps --required --skipLibCheck --tsNodeRegister=true -o schemas/${OUT} schemas/${IN} ${CLASS}
|
|
|
|
gen-schema:
|
|
make IN=config/config.ts \
|
|
CLASS=Config \
|
|
OUT=config.schema.json \
|
|
gen-schema-single
|
|
make IN=providers/routes.ts \
|
|
CLASS=Routes \
|
|
OUT=routes.schema.json \
|
|
gen-schema-single
|
|
make IN=middlewares/middleware_compose.ts \
|
|
CLASS=MiddlewareCompose \
|
|
OUT=middleware_compose.schema.json \
|
|
gen-schema-single
|
|
make IN=docker.ts \
|
|
CLASS=DockerRoutes \
|
|
OUT=docker_routes.schema.json \
|
|
gen-schema-single
|
|
|
|
push-github:
|
|
git push origin $(shell git rev-parse --abbrev-ref HEAD)
|