From 568683dbf8a844d002690105803ca7dd6dc03f01 Mon Sep 17 00:00:00 2001 From: Nathan Rzepecki Date: Sun, 6 Sep 2020 15:48:11 +0800 Subject: [PATCH 1/3] Remove the auth list. see the caddy docks if needed --- caddy/caddy/authlist.conf | 1 - 1 file changed, 1 deletion(-) delete mode 100644 caddy/caddy/authlist.conf diff --git a/caddy/caddy/authlist.conf b/caddy/caddy/authlist.conf deleted file mode 100644 index 651bf55e..00000000 --- a/caddy/caddy/authlist.conf +++ /dev/null @@ -1 +0,0 @@ -basicauth / laradock laradock From 283ea64fbf19c62ad710a9136f7ab1cc86208a27 Mon Sep 17 00:00:00 2001 From: Nathan Rzepecki Date: Sun, 6 Sep 2020 15:48:43 +0800 Subject: [PATCH 2/3] Update the Dockerfile to use the official caddy2 docker images --- caddy/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/caddy/Dockerfile b/caddy/Dockerfile index c9b74b70..e2af8fde 100644 --- a/caddy/Dockerfile +++ b/caddy/Dockerfile @@ -1,5 +1,5 @@ -FROM abiosoft/caddy:no-stats +FROM caddy/caddy:latest -CMD ["--conf", "/etc/caddy/Caddyfile", "--log", "stdout", "--agree=true"] +COPY ./caddy/Caddyfile /etc/caddy/Caddyfile -EXPOSE 80 443 2015 +EXPOSE 80 443 From 6a48af77304f7349ce4391cd06ba250d7187f1c2 Mon Sep 17 00:00:00 2001 From: Nathan Rzepecki Date: Sun, 6 Sep 2020 15:49:23 +0800 Subject: [PATCH 3/3] Update the Caddyfile to serve a simple https local environment --- caddy/caddy/Caddyfile | 54 +++++-------------------------------------- 1 file changed, 6 insertions(+), 48 deletions(-) diff --git a/caddy/caddy/Caddyfile b/caddy/caddy/Caddyfile index 1848d346..2fab010d 100644 --- a/caddy/caddy/Caddyfile +++ b/caddy/caddy/Caddyfile @@ -1,51 +1,9 @@ # Docs: https://caddyserver.com/docs/caddyfile -0.0.0.0:80 { - root /var/www/public - fastcgi / php-fpm:9000 php { - index index.php - } +laradock.test { + root * /var/www/public + php_fastcgi php-fpm:9000 + file_server - # To handle .html extensions with laravel change ext to - # ext / .html - - rewrite { - to {path} {path}/ /index.php?{query} - } - gzip - browse - log /var/log/caddy/access.log - errors /var/log/caddy/error.log - # Uncomment to enable TLS (HTTPS) - # Change the first list to listen on port 443 when enabling TLS - #tls self_signed - - # To use Lets encrpt tls with a DNS provider uncomment these - # lines and change the provider as required - #tls { - # dns cloudflare - #} + encode gzip + tls internal } - -laradock1.demo:80 { - root /var/www/public - # Create a Webhook in git. - #git { - #repo https://github.com/xxx/xxx - # path /home/xxx - # #interval 60 - # hook webhook laradock - # hook_type generic - #} - -} - -laradock2.demo:80 { - # Create a Proxy and cors. - #proxy domain.com - #cors -} - -laradock3.demo:80 { - import authlist.conf - root /var/www/public -} \ No newline at end of file