]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6555 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 5 Dec 2023 20:42:30 +0000 (21:42 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 5 Dec 2023 20:42:30 +0000 (21:42 +0100)
app/Jobs/HostingUpdate.php
resources/hosting/nginxproxy/config/custom_proxy_settings.conf [deleted file]
resources/hosting/nginxproxy/config/timeout.conf [deleted file]
resources/hosting/nginxproxy/docker-compose.yml [deleted file]
resources/hosting/nginxproxy/update [deleted file]
resources/hosting/server/config/httpd.conf [new file with mode: 0644]
resources/hosting/server/docker-compose.yml

index b53c72769fe95caafc4d99f82b905e850cc90864..974e75c6a394bd387e864c3f4ab6065ba4ee98c1 100644 (file)
@@ -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 (file)
index 227c534..0000000
+++ /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 (file)
index 579026a..0000000
+++ /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 (file)
index ada051e..0000000
+++ /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 (file)
index b1082dd..0000000
+++ /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 (file)
index 0000000..7f3edc2
--- /dev/null
@@ -0,0 +1,7 @@
+LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
+
+<Directory /var/www/html>
+        Options Indexes FollowSymLinks
+        AllowOverride All
+        Require all granted
+</Directory>
index 9e3745f50eeb911004be7c4421776f7995b928c4..56a8d98d8000317231be45ae800491e9bda38333 100644 (file)
@@ -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