Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/christippett/porkbun-ical
Track your Porkbun domain renewals/expiries from your calendar.
https://github.com/christippett/porkbun-ical
domains ical porkbun webcal
Last synced: 2 months ago
JSON representation
Track your Porkbun domain renewals/expiries from your calendar.
- Host: GitHub
- URL: https://github.com/christippett/porkbun-ical
- Owner: christippett
- License: mit
- Created: 2024-08-01T02:02:20.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-01T02:40:12.000Z (6 months ago)
- Last Synced: 2024-08-01T04:49:22.697Z (6 months ago)
- Topics: domains, ical, porkbun, webcal
- Language: Python
- Homepage:
- Size: 257 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Porkbun iCal
*A calendar service for your Porkbun domains.*
![Project icon](./assets/icon.svg "Porkbun iCal")
---
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:
## Usage
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:
1. Environment variables deployed with the service.
2. HTTP Basic Auth per request.### 1. Environment variables
| Parameter | Value |
| -------------------- | ------------------ |
| PORKBUN_API_KEY | Porkbun API key |
| PORKBUN_API_SECRET | Porkbun API secret |### 2. HTTP Basic Auth
| Parameter | Value |
| ---------- | ------------------ |
| Username | Porkbun API key |
| Password | Porkbun API secret |```bash
curl -u "$PORKBUN_API_KEY:$PORKBUN_API_SECRET" --basic https://your-service-url/calendar.ics
```## Deployment
Click below to deploy the service to Cloud Run on Google Cloud (I made [their button](https://github.com/GoogleCloudPlatform/cloud-run-button) more fun).
[![Run on Google Cloud](./assets/unofficial-button.svg "Deploy to Cloud Run")](https://deploy.cloud.run)
---
## Notes (to self)
### Local development
I'm trying out [Rye](https://github.com/astral-sh/rye) for this project.
```bash
# 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
```### Local TLS with Caddy + Tailscale
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.
```bash
caddy reverse-proxy --from machine.pickled-pigeon.ts.net --to localhost:8080
```### Docker / Podman
```bash
# 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
```