Frederic G. MARAND 463dfa37b7 i18n WIP with x/text. | 5 سال پیش | |
---|---|---|
.idea | 5 سال پیش | |
cmd | 5 سال پیش | |
doc | 6 سال پیش | |
domain | 5 سال پیش | |
infrastructure | 6 سال پیش | |
licenses | 6 سال پیش | |
migrations | 6 سال پیش | |
text | 5 سال پیش | |
web | 5 سال پیش | |
.gitignore | 6 سال پیش | |
LICENSE.txt | 6 سال پیش | |
Makefile | 5 سال پیش | |
README.md | 6 سال پیش | |
go.mod | 5 سال پیش | |
go.sum | 5 سال پیش |
Kurz is yet another URL shortener.
Download the Kurz server to $GOPATH/bin
go get code.osinet.fr/fgm/kurz/cmd/kurzd
Download the Kurz client to $GOPATH/bin
go get code.osinet.fr/fgm/kurz/cmd/kurz
Configure a MySQL database for Kurz, say osinet_kurz
Create the Kurz configuration
mkdir ~/.kurz
cp <kurz dir>/cmd/kurzd/dist.config.yml ~/.kurz/config.yml
vi ~/.kurz/config.yml
1. Edit the configuration and save it.
1. Discover the server syntax:
bash kurzd help
1. Load the Kurz schema to the database:
bash kurzd migrate up
# Runnning the Kurz server
bash
kurzd
# Operating the Kurz server
## Backing up
bash kurzd export config > some_config_backup_file.yml kurzd export content > some_content_backup_file.yml ```
This will need some automation, like cron, to trigger backups and ensure backups rotation, as well as removal on uninstall.
Kurzd logs to stdout, so any production deployment will need to set up logs acquisition and storage, with rotation, and remove them on uninstall. This is normally part of a SystemD - or equivalent - service configuration.
Drop the Kurz database
mysql -u<user> -p<password> -e "drop database osinet_kurz;"
If the database used a specific user/password, remove them from the database server
Remove the Kurz configuration
rm ~/.kurz/config.yml
Remove Kurz binaries (assuming an single-component $GOPATH
)
rm $GOPATH/bin/kurz*