From 86fc19d20555c491e55636fc984b4968c791673c Mon Sep 17 00:00:00 2001 From: StarWhiz Date: Mon, 30 Jan 2023 16:58:15 -0800 Subject: [PATCH] added yourls a bitly alternative --- yourls/README.md | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 yourls/README.md diff --git a/yourls/README.md b/yourls/README.md new file mode 100644 index 0000000..e73cc49 --- /dev/null +++ b/yourls/README.md @@ -0,0 +1,57 @@ +Bit.ly alternative +https://yourls.org/ + +This is not a full tutorial but more of a reference. + +### Minimum File Structure +``` +/home/ +└── ~/ + └── docker/ + └── yourls/ + ├── docker-compose.yml +``` +### Add to Caddyfile (from ~/docker/caddy) +Remember to `docker exec -w /etc/caddy caddy caddy reload` after editing your Caddyfile. + +``` +urls.YOURDOMAIN.com { + reverse_proxy yourls:80 +} +``` + +### docker-compose.yml +Change YOURDATABASEPASSWORD in 2 lines and change YOURADMINUSERPASSWORD in one line from the yml below. + +``` +version: '3.1' + +services: + yourls: + image: yourls + container_name: yourls + restart: unless-stopped +# ports: +# - 8080:80 + environment: + YOURLS_DB_HOST: yourls-db + YOURLS_DB_PASS: YOURDATABASEPASSWORD + YOURLS_PRIVATE: "true" + YOURLS_SITE: https://urls.YOURDOMAIN.com + YOURLS_USER: yourls + YOURLS_PASS: YOURADMINUSERPASSWORD + + mysql: + image: mysql + container_name: yourls-db + restart: unless-stopped + environment: + MYSQL_ROOT_PASSWORD: YOURDATABASEPASSWORD + MYSQL_DATABASE: yourls + +networks: + default: + external: + name: caddy_net + +``` \ No newline at end of file