bluesky-pds-docker/Makefile

37 lines
No EOL
1.1 KiB
Makefile

REGISTRY=forgejo.gravityfargo.dev
OWNER=gravityfargo
IMAGE=bluesky-pds
TAG=0.4.74
DOMAIN=sheltersky.social
export DOCKER_BUILDKIT=1
# export BUILDKIT_PROGRESS=plain
.PHONY: build-tag
build-tag:
docker build --tag $(REGISTRY)/$(OWNER)/$(IMAGE):$(TAG) .
.PHONY: wsdump
wsdump:
wsdump "wss://$(DOMAIN)/xrpc/com.atproto.sync.subscribeRepos?cursor=0"
.PHONY: generate-env
generate-env:
$(eval PDS_JWT_SECRET=$(shell openssl rand --hex 16))
$(eval PDS_ADMIN_PASSWORD=$(shell openssl rand --hex 16))
$(eval PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX=$(shell openssl ecparam --name secp256k1 --genkey --noout --outform DER | tail --bytes=+8 | head --bytes=32 | xxd --plain --cols 32))
@echo "PDS_JWT_SECRET=$(PDS_JWT_SECRET)" > .env
@echo "PDS_ADMIN_PASSWORD=$(PDS_ADMIN_PASSWORD)" >> .env
@echo "PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX=$(PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX)" >> .env
@echo "PDS_HOSTNAME=$(DOMAIN)" >> .env
@echo "URL_NAME:" >> .env
@echo "URL_SUFFIX:" >> .env
.PHONY: run
run:
docker compose up
.PHONY: push
push:
docker push $(REGISTRY)/$(OWNER)/$(IMAGE):$(TAG)