https://github.com/soyuka/caligo
Scalable URL obfuscator service
https://github.com/soyuka/caligo
boltdb golang k8s redis url-shortener
Last synced: about 1 year ago
JSON representation
Scalable URL obfuscator service
- Host: GitHub
- URL: https://github.com/soyuka/caligo
- Owner: soyuka
- License: mit
- Created: 2020-04-30T14:15:50.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-14T22:56:48.000Z (over 3 years ago)
- Last Synced: 2024-10-04T16:37:01.478Z (over 1 year ago)
- Topics: boltdb, golang, k8s, redis, url-shortener
- Language: Go
- Homepage: https://caligo.space
- Size: 62.5 KB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Caligo 🧿
🧿 [Caligo meaning](https://fr.wiktionary.org/wiki/caligo#la).
## Stack
- Go http api
- [boltdb](https://github.com/etcd-io/bbolt) database
- [nanoid](https://github.com/matoous/go-nanoid) for id generation
Go HTTP and boltdb should scale well if you have money.
## How
- /?google.com
## Configuration
- `CALIGO_DB` (default=bolt://data.bolt) db path
- `CALIGO_HOSTNAME` (default=localhost:5376) hostname
- `CALIGO_ID_LENGTH` (default=12) nanoid length (see [collision calculator](https://zelark.github.io/nano-id-cc/))
- `CALIGO_ID_ALPHABET` (default=0123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ) nanoid alphabet)
- `CALIGO_PORT` (default=5376)
## Docker
```
docker pull soyuka/caligo
docker run -d --name caligo -p 5376:5376 -e CALIGO_DB=bolt:///bolt/caligo.bolt -e CALIGO_HOSTNAME=https://caligo.space -v "/home/soyuka/caligodb:/bolt" soyuka/caligo
```
## Kubernetes
Get redis password and create a config map.
```
kubectl get secret --namespace default caligo-redis -o jsonpath="{.data.redis-password}" | base64 --decode
kubectl create configmap caligo-config --from-literal caligo-db=redis://:Y3Jv8HO2Yc@localhost:6379/1
```
## TODO
- allow custom url
- statistics click