@@ -337,7 +337,7 @@
"Web",
"Webserver"
],
- "description": "Caddy - The Ultimate Server with Automatic HTTPS",
+ "description": "Caddy - The Ultimate Server with Automatic HTTPS. Need to run tools/install_caddy.sh before installing the template.",
"image": "caddy:latest",
"logo": "https://raw.githubusercontent.com/novaspirit/pi-hosted/master/images/caddy.png",
"name": "caddy",
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+function error {
+ echo -e "\\e[91m$1\\e[39m"
+ exit 1
+}
+echo "Creating directories..."
+sudo mkdir -p /portainer/Files/AppData/Config/Caddy || error "Failed to create Caddy folder!"
+echo "Creating a blank caddy config files"
+sudo touch /portainer/Files/AppData/Config/Caddy/caddyfile || error "Failed to touch caddyfile file!"
+echo "Setup complete. You can now install Caddy using the App Template."