A calendar service for your Porkbun domains.
Each domain's respective renewal/expiry date will be added to your calendar as an event. Here's what it looks like in the Calendar app on macOS:
Once deployed, subscribe to your calendar by visiting https://your-service-url/calendar.ics
.
The service uses Porkbun's API to fetch details of your domains. You can provide your API credentials in one of two ways:
- Environment variables deployed with the service.
- HTTP Basic Auth per request.
Parameter | Value |
---|---|
PORKBUN_API_KEY | Porkbun API key |
PORKBUN_API_SECRET | Porkbun API secret |
Parameter | Value |
---|---|
Username | Porkbun API key |
Password | Porkbun API secret |
curl -u "$PORKBUN_API_KEY:$PORKBUN_API_SECRET" --basic https://your-service-url/calendar.ics
Click below to deploy the service to Cloud Run on Google Cloud (I made their button more fun).
I'm trying out Rye for this project.
# Setup virtual environment and install dependencies.
rye sync
# Activate virtual environment (using fish shell).
source ./.venv/bin/activate.fish
# Run Flask app, using 1Password to populate environment variables.
op run --env-file=.env -- python -m flask --app src/main.py run
We can leverage the integration between Caddy and Tailscale to serve the app locally over HTTPS. This is helpful since macOS's Calendar app enforces the use of HTTPS when using Basic Auth.
caddy reverse-proxy --from machine.pickled-pigeon.ts.net --to localhost:8080
# Build container image.
podman build -t porkbun-ical .
# Run container image, using 1Password to populate environment variables.
op run --env-file=.env -- podman run -e PORKBUN_API_KEY -e PORKBUN_API_SECRET -p 8080:8080 porkbun-ical