Browse Source

Merge pull request #2699 from lionslair/feature/upgrade-caddy-version-2

Upgrade Caddy Webserver to version 2
Shao Yu-Lung (Allen) 3 years ago
parent
commit
0d1479b2b7
3 changed files with 9 additions and 52 deletions
  1. 3 3
      caddy/Dockerfile
  2. 6 48
      caddy/caddy/Caddyfile
  3. 0 1
      caddy/caddy/authlist.conf

+ 3 - 3
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

+ 6 - 48
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
-    #}
-}
-
-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
+    encode gzip
+    tls internal
 }
-
-laradock3.demo:80 {
-    import authlist.conf
-    root /var/www/public
-}

+ 0 - 1
caddy/caddy/authlist.conf

@@ -1 +0,0 @@
-basicauth / laradock laradock