From 858b1d6288656de754a9cb75b776511d0b6cbf53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Wed, 12 Oct 2022 04:45:41 +0200 Subject: [PATCH] Add more instructions how to use this program --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index 908e2b5..5ce79cf 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,34 @@ embed for you. The embed will be the same as the one you would get if you send a | UPLOAD_FOLDER | Path to the directory where we store files. | | WEBHOOK_URL | Discord Webhook URL | +## Howto + +Your webserver infront of discord-embed needs to be configured for this program to work. + +Nginx: +```nginx +# One subdomain that is a reverse proxy to discord-embed and one subdomain (SERVE_DOMAIN) for images +# The SERVE_DOMAIN url needs this: +root /var/www/embed; # The UPLOAD_FOLDER where our images are +location / { + try_files $uri $uri/ $uri.html =404; # Note the $uri.html +} +``` + +Caddy: +``` +# SERVE_DOMAIN = i.example.com +# UPLOAD_FOLDER = /var/www/embed +embed.example.com { + reverse_proxy * http://discord-embed:5000 # The Docker container where discord-embed runs +} + +i.example.com { + root * /var/www/embed + try_files {uri} {uri}/ {uri}.html + file_server +} +``` ## Need help? - Email: [tlovinator@gmail.com](mailto:tlovinator@gmail.com)