diff --git a/5.0.0-alpha.2 b/5.0.0-alpha.2 deleted file mode 100644 index 2f114e37..00000000 --- a/5.0.0-alpha.2 +++ /dev/null @@ -1,2 +0,0 @@ -+ eslint@4.19.1 -added 67 packages and updated 1 package in 41.428s diff --git a/caddy/Caddyfile b/caddy/Caddyfile new file mode 100644 index 00000000..a3fa4962 --- /dev/null +++ b/caddy/Caddyfile @@ -0,0 +1,46 @@ +# Docs: https://caddyserver.com/docs/caddyfile +https://exchange-staging.izyim.com { + root /var/www/public + fastcgi / php-fpm:9000 php { + index index.php + } + + # 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 admin@izyim.com + + # 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 +} \ No newline at end of file diff --git a/caddy/Dockerfile b/caddy/Dockerfile new file mode 100644 index 00000000..a4e23728 --- /dev/null +++ b/caddy/Dockerfile @@ -0,0 +1,17 @@ +FROM zuohuadong/caddy:alpine + +LABEL maintainer="Huadong Zuo " + +ARG plugins="cors" + +## ARG plugins="cors cgi cloudflare azure linode" + + +RUN caddyplug install ${plugins} + + +EXPOSE 80 443 2015 + +WORKDIR /var/www/public + +CMD ["/usr/bin/caddy", "-conf", "/etc/Caddyfile","-agree"] \ No newline at end of file diff --git a/docker-prod.yml b/docker-prod.yml index 0ae5fdf4..a2758cd5 100644 --- a/docker-prod.yml +++ b/docker-prod.yml @@ -13,14 +13,20 @@ services: - "DB_HOST=database" - "REDIS_HOST=cache" - # The Web Server - web: - image: shakyshane/laravel-web + + ### Caddy Server ######################################### + caddy: + build: ./caddy volumes: - - "${LE_DIR}:/etc/letsencrypt" + - ./caddy/Caddyfile:/etc/Caddyfile + - ./logs/caddy:/var/log/caddy + - ./data:/root/.caddy ports: - - 80:80 - - 443:443 + - "${CADDY_HOST_HTTP_PORT}:80" + - "${CADDY_HOST_HTTPS_PORT}:443" + depends_on: + - app + # The Database database: diff --git a/vhost.conf b/vhost.conf deleted file mode 100644 index fc132d04..00000000 --- a/vhost.conf +++ /dev/null @@ -1,36 +0,0 @@ -server { - server_name localhost; - listen 443 ssl http2 default_server; - listen [::]:443 ssl http2 default_server; - - ssl_certificate /etc/letsencrypt/live/exchange-staging.izyim.com/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/exchange-staging.izyim.com/privkey.pem; - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_prefer_server_ciphers on; - ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'; - ssl_session_timeout 1d; - ssl_session_cache shared:SSL:50m; - add_header Strict-Transport-Security max-age=15768000; - - index index.php index.html; - root /var/www/public; - - location / { - try_files $uri /index.php?$args; - } - - location ~ \.php$ { - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass app:9000; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_param PATH_INFO $fastcgi_path_info; - } -} - -server { - listen 80; - listen [::]:80; - return 301 https://$host$request_uri; -} \ No newline at end of file