]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6360 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 6 Oct 2023 07:20:10 +0000 (09:20 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 6 Oct 2023 07:20:10 +0000 (09:20 +0200)
app/Http/Controllers/Admin/Operations/Tools/DockerWebContainer.php
resources/tools/dockerwebcontainer/php
resources/tools/dockerwebcontainer/template/config/php.ini
resources/tools/dockerwebcontainer/template/update

index e9da0a30644f5855b6f8c787e0762f9ae577c3ea..2bafcd21dcd9a8b1c30e6004e24e040b668bc5a5 100644 (file)
@@ -73,11 +73,13 @@ trait DockerWebContainer
                 '$locale' => 'fr_FR',
                 '$localeshort' => 'fr',
                 '$sshpassword' => Str::random(16),
+                '$fixrights' => '',
             ];
 
             if (!$variables['$domain']) {
                 $variables['$domain'] = $name . '.dev.cubedesigners.com';
             }
+            $fixRights = [];
             $variables['$domain'] = $subDomain . $variables['$domain'];
 
             $dir = Files::mkdir($tmp . '/' . $name . $dockerSuffix);
@@ -91,9 +93,11 @@ trait DockerWebContainer
                 if (version_compare($variables['$phpversion'], '7.3', '<=')) {
                     $variables['$phpfpmimage'] = 'php-' . $variables['$phpversion'] . '-fpm';
                 }
+                $fixRights[] = 'chown 0:0 ./config/cron/crontab';
             }
             if ($request->get('mysql', true)) {
                 $compose[] = 'mysql';
+                $fixRights[] = 'chown -R 999:999 ./database/data';
             }
             if ($request->get('redis', true)) {
                 $compose[] = 'redis';
@@ -103,7 +107,11 @@ trait DockerWebContainer
             }
             if ($request->get('elasticsearch', false)) {
                 $compose[] = 'elasticsearch';
+                $fixRights[] = 'chmod -R 777 ./esdata';
             }
+
+            $variables['$fixrights'] = implode("\n", $fixRights);
+
             $compose[] = 'network';
             $composeFileContent = '';
             foreach ($compose as $item) {
index 40a6810eb84e7d4dc6af1cdccb1678135378e024..3fca33d5df4130ab23e3c4a9b0f6d0c2a96b804b 100644 (file)
@@ -20,6 +20,8 @@
             - './config/imagemagick/policy.xml:/etc/ImageMagick-6/policy.xml'
             # Passwords
             - './config/passwords:/root/passwords'
+            # Cron
+            - './config/cron/crontab:/etc/crontab'
             # PHP
             - './config/php.ini:/etc/php/$phpversion/fpm/conf.d/99-overrides.ini'
             # Web path
index c0ef7ab55d13fb9298036ca6c88bd981d6e5df31..dba8bcff6bfd6ddd3f210781eb3ca09cb21cd5dd 100644 (file)
@@ -1,5 +1,6 @@
 upload_max_filesize = 8G
 post_max_size = 8G
+max_file_uploads = 1000
 error_log = /proc/self/fd/2
 log_errors = 1
 memory_limit = 12G
index 96c0a88fc20dde1f07014f9bb3a5457c15722336..86cc0fa5d532b00b3573a63c91c4713d1b2fe47b 100644 (file)
@@ -1,7 +1,11 @@
 #!/bin/sh
 cd /docker/$name
 docker network create $name
+
+$fixrights
+
 COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose pull
 COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose build
+
 docker compose down
 docker compose up -d