bluesky-pds-docker/Makefile

36 lines
1.1 KiB
Makefile
Raw Permalink Normal View History

2024-12-10 22:57:22 +00:00
TAG ?= latest
2024-12-02 00:15:39 +00:00
export DOCKER_BUILDKIT=1
export BUILDKIT_PROGRESS=plain
.PHONY: build-base
build-base:
docker build --tag pds-runtime ./base
2024-12-02 00:15:39 +00:00
2024-12-03 22:48:27 +00:00
.PHONY: build-tag
build-tag:
sudo rm -rf config
2024-12-10 22:57:22 +00:00
docker build --tag forgejo.gravityfargo.dev/gravityfargo/bluesky-pds:$(TAG) .
2024-12-03 22:48:27 +00:00
.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=" >> .env
@echo "PUID=1000" >> .env
@echo "PGID=1000" >> .env
@echo "URL_NAME:" >> .env
@echo "URL_SUFFIX:" >> .env
2024-12-02 00:15:39 +00:00
.PHONY: run
run:
2024-12-03 01:42:57 +00:00
docker compose up
.PHONY: push
push:
2024-12-10 22:57:22 +00:00
docker push forgejo.gravityfargo.dev/gravityfargo/bluesky-pds:latest