Nathan Price
5caac7aead
Moved previous stages to base image. Removed unneeded Makefile targets. PDS_HOSTNAME must be the same as the container $hostname.
40 lines
No EOL
1.1 KiB
Makefile
40 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-base
|
|
build-base:
|
|
docker build --tag pds-runtime ./base
|
|
|
|
.PHONY: build-tag
|
|
build-tag:
|
|
sudo rm -rf config
|
|
docker build --no-cache --tag $(REGISTRY)/$(OWNER)/$(IMAGE):$(TAG) .
|
|
|
|
.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
|
|
|
|
.PHONY: run
|
|
run:
|
|
docker compose up
|
|
|
|
.PHONY: push
|
|
push:
|
|
docker push $(REGISTRY)/$(OWNER)/$(IMAGE):$(TAG)
|