From 3c5c131426c4bdbe05e045e69e36dcbcd01328f8 Mon Sep 17 00:00:00 2001 From: Magicalex Date: Fri, 5 Feb 2021 01:35:29 +0100 Subject: [PATCH] fix(): buildx cannot copy to non-directory --- LICENSE | 3 +-- README.md | 13 +++++++------ rootfs/etc/nginx/{conf.d => flarum}/.gitkeep | 0 rootfs/etc/nginx/nginx.conf | 2 +- rootfs/etc/php7/conf.d/00_opcache.ini | 1 + rootfs/usr/local/bin/startup | 4 ++-- 6 files changed, 12 insertions(+), 11 deletions(-) rename rootfs/etc/nginx/{conf.d => flarum}/.gitkeep (100%) diff --git a/LICENSE b/LICENSE index 35b15a5..3822550 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,6 @@ - MIT License -Copyright (c) 2016-2020 mondedie/flarum +Copyright (c) 2021 mondedie/flarum Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 3b96865..1111eaf 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,8 @@ - Multi-platform image: `linux/386`, `linux/amd64`, `linux/arm/v6`, `linux/arm/v7`, `linux/arm64` - Lightweight & secure image -- Based on Alpine Linux with **nginx** and **PHP 7.3** +- Based on Alpine Linux 3.13 +- **nginx** and **PHP 7.4** - Latest [Flarum Core](https://github.com/flarum/core) (v0.1.0-beta.15) - MySQL/Mariadb driver - OPCache extension configured @@ -36,7 +37,7 @@ - **/flarum/app/public/assets** : Flarum assets directory - **/flarum/app/extensions** : Flarum extension directory -- **/etc/nginx/conf.d** : Nginx location directory +- **/etc/nginx/flarum** : Nginx location directory ### Environment variables @@ -95,7 +96,7 @@ services: volumes: - /mnt/docker/flarum/assets:/flarum/app/public/assets - /mnt/docker/flarum/extensions:/flarum/app/extensions - - /mnt/docker/flarum/nginx:/etc/nginx/conf.d + - /mnt/docker/flarum/nginx:/etc/nginx/flarum ports: - 80:8888 depends_on: @@ -168,7 +169,7 @@ services: volumes: - /mnt/docker/flarum/assets:/flarum/app/public/assets - /mnt/docker/flarum/extensions:/flarum/app/extensions - - /mnt/docker/flarum/nginx:/etc/nginx/conf.d + - /mnt/docker/flarum/nginx:/etc/nginx/flarum ``` This example install php7-gmp php7-session and php7-brotli with apk @@ -198,8 +199,8 @@ docker exec -ti flarum extension list ### Custom vhost flarum nginx -File to change the vhost flarum `/etc/nginx/conf.d/custom-vhost-flarum.conf` -To use file custom-vhost-flarum.conf add volume `/etc/nginx/conf.d` +File to change the vhost flarum `/etc/nginx/flarum/custom-vhost-flarum.conf` +To use file custom-vhost-flarum.conf add volume `/etc/nginx/flarum` ### Custom composer repositories diff --git a/rootfs/etc/nginx/conf.d/.gitkeep b/rootfs/etc/nginx/flarum/.gitkeep similarity index 100% rename from rootfs/etc/nginx/conf.d/.gitkeep rename to rootfs/etc/nginx/flarum/.gitkeep diff --git a/rootfs/etc/nginx/nginx.conf b/rootfs/etc/nginx/nginx.conf index 52f84af..a67b0af 100644 --- a/rootfs/etc/nginx/nginx.conf +++ b/rootfs/etc/nginx/nginx.conf @@ -57,6 +57,6 @@ http { fastcgi_param REMOTE_ADDR $http_x_real_ip; } - include /etc/nginx/conf.d/custom-vhost-flarum.conf; + include /etc/nginx/flarum/custom-vhost-flarum.conf; } } diff --git a/rootfs/etc/php7/conf.d/00_opcache.ini b/rootfs/etc/php7/conf.d/00_opcache.ini index 13b2f2a..9734f9e 100644 --- a/rootfs/etc/php7/conf.d/00_opcache.ini +++ b/rootfs/etc/php7/conf.d/00_opcache.ini @@ -1,4 +1,5 @@ zend_extension=opcache.so + opcache.enable=1 opcache.enable_cli=1 opcache.fast_shutdown=1 diff --git a/rootfs/usr/local/bin/startup b/rootfs/usr/local/bin/startup index ba1655b..aaf8735 100644 --- a/rootfs/usr/local/bin/startup +++ b/rootfs/usr/local/bin/startup @@ -66,12 +66,12 @@ if [ -f '/flarum/app/extensions/composer.repositories.txt' ]; then fi # Custom vhost flarum nginx -if [ ! -e '/etc/nginx/conf.d/custom-vhost-flarum.conf' ]; then +if [ ! -e '/etc/nginx/flarum/custom-vhost-flarum.conf' ]; then echo '# Example: # fix for flagrow/sitemap (https://github.com/flagrow/sitemap) # location = /sitemap.xml { # try_files $uri $uri/ /index.php?$query_string; -# }' > /etc/nginx/conf.d/custom-vhost-flarum.conf +# }' > /etc/nginx/flarum/custom-vhost-flarum.conf fi # if installation was performed before