From: Vincent Vanwaelscappel Date: Tue, 5 Dec 2023 20:42:30 +0000 (+0100) Subject: wip #6555 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c653c70ec10056321d57c2487f094f552af7dca1;p=fluidbook-toolbox.git wip #6555 @0.5 --- diff --git a/app/Jobs/HostingUpdate.php b/app/Jobs/HostingUpdate.php index b53c72769..974e75c6a 100644 --- a/app/Jobs/HostingUpdate.php +++ b/app/Jobs/HostingUpdate.php @@ -35,16 +35,17 @@ class HostingUpdate extends Base copy($r . 'updateall', $d . 'update'); + foreach ($servers as $server) { $s = $d . 'server-' . $server->id; Files::copy($r . 'server', $s); Files::recursiveReplaceStringInDir($s, [ '$sid' => $server->id, - '$image' => $server->php ? 'php:apache' : 'httpd', - '$dockerpath' => $server->php ? '/var/www/html' : '/usr/local/apache2/htdocs', + '$image' => (true || $server->php) ? 'php:apache' : 'httpd', + '$dockerpath' => (true || $server->php) ? '/var/www/html' : '/usr/local/apache2/htdocs', '$domains' => implode(',', Text::explodeNewLines($server->subdomains)), '$hosting' => $name, - '$path' => $data['basepath'].$server->base_path, + '$path' => $data['basepath'] . $server->base_path, ]); $updateAll[] = '/docker/fluidbook-' . $name . '/server-' . $server->id . '/update'; } diff --git a/resources/hosting/nginxproxy/config/custom_proxy_settings.conf b/resources/hosting/nginxproxy/config/custom_proxy_settings.conf deleted file mode 100644 index 227c53443..000000000 --- a/resources/hosting/nginxproxy/config/custom_proxy_settings.conf +++ /dev/null @@ -1,2 +0,0 @@ -client_max_body_size 2m; - diff --git a/resources/hosting/nginxproxy/config/timeout.conf b/resources/hosting/nginxproxy/config/timeout.conf deleted file mode 100644 index 579026a30..000000000 --- a/resources/hosting/nginxproxy/config/timeout.conf +++ /dev/null @@ -1,4 +0,0 @@ -proxy_connect_timeout 30; -proxy_send_timeout 30; -proxy_read_timeout 30; -send_timeout 30; diff --git a/resources/hosting/nginxproxy/docker-compose.yml b/resources/hosting/nginxproxy/docker-compose.yml deleted file mode 100644 index ada051e75..000000000 --- a/resources/hosting/nginxproxy/docker-compose.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: '2' -services: - fluidbook-$hosting-nginx-proxy: - image: nginxproxy/nginx-proxy - container_name: fluidbook-$hosting-proxy - networks: - - fluidbook-$hosting - ports: - - "$ip:80:80" - - "$ip:443:443" - volumes: - - /var/run/docker.sock:/tmp/docker.sock:ro - - ./config/timeout.conf:/etc/nginx/conf.d/timeout.conf:ro - - ./config/custom_proxy_settings.conf:/etc/nginx/conf.d/custom_proxy_settings.conf:ro - - ./vhosts:/etc/nginx/vhost.d - - ./html:/usr/share/nginx/html - - /docker/nginxproxy/certs:/etc/nginx/certs - restart: unless-stopped - -networks: - fluidbook-$hosting: - external: - name: fluidbook-$hosting diff --git a/resources/hosting/nginxproxy/update b/resources/hosting/nginxproxy/update deleted file mode 100644 index b1082dd57..000000000 --- a/resources/hosting/nginxproxy/update +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -cd /docker/fluidbook-$hosting/nginxproxy/ -docker-compose pull -docker-compose down -docker-compose up -d diff --git a/resources/hosting/server/config/httpd.conf b/resources/hosting/server/config/httpd.conf new file mode 100644 index 000000000..7f3edc24b --- /dev/null +++ b/resources/hosting/server/config/httpd.conf @@ -0,0 +1,7 @@ +LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so + + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted + diff --git a/resources/hosting/server/docker-compose.yml b/resources/hosting/server/docker-compose.yml index 9e3745f50..56a8d98d8 100644 --- a/resources/hosting/server/docker-compose.yml +++ b/resources/hosting/server/docker-compose.yml @@ -5,6 +5,7 @@ services: image: $image volumes: - '$path:$dockerpath' + - './config/httpd.conf:/etc/apache2/conf-enabled/99-config.conf' environment: VIRTUAL_HOST: $domains LETSENCRYPT_HOST: $domains