From a76ad6f7750d2861b25c33931da0912a0ccffd12 Mon Sep 17 00:00:00 2001 From: Mauro Torrez Date: Fri, 11 Oct 2019 23:20:38 -0300 Subject: [PATCH] fix unit config --- 14.0/unit/Dockerfile | 56 ++++++++++++++++++++++------------------ 15.0/unit/Dockerfile | 56 ++++++++++++++++++++++------------------ 16.0/unit/Dockerfile | 56 ++++++++++++++++++++++------------------ 17.0/unit/Dockerfile | 56 ++++++++++++++++++++++------------------ Dockerfile-unit.template | 48 +++++++++++++++++----------------- 5 files changed, 148 insertions(+), 124 deletions(-) diff --git a/14.0/unit/Dockerfile b/14.0/unit/Dockerfile index 586a65d..5e6aec0 100644 --- a/14.0/unit/Dockerfile +++ b/14.0/unit/Dockerfile @@ -103,31 +103,37 @@ RUN \ && unitd --control unix:/var/run/control.unit.sock \ && curl -X PUT --data-binary \ '{ \ - "listeners": { "*:9000": { "pass": "routes/main" } }, \ - "listeners": { "*:9001": { "pass": "routes/dynamic" } }, \ - "listeners": { "*:9002": { "pass": "routes/static" } }, \ + "listeners": { \ + "*:9000": { "pass": "routes/main" }, \ + "*:9001": { "pass": "routes/dynamic" }, \ + "*:9002": { "pass": "routes/static" }, \ + "*:9003": { "pass": "routes/direct" } \ + }, \ "routes": { \ - "main": [ \ - { "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/cron.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/index.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/public.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/remote.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/status.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/version.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/core/img/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/core/css/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/core/fonts/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/core/js/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/themes/*" }, "action": { "share": "/var/www/html" } }, \ - { "action": { "pass": "applications/index_php" } } \ - ], \ - "static": [ \ - { "action": { "share": "/var/www/html" } } \ - ], \ - "dynamic": [ \ - { "action": { "pass": "applications/index_php" } } \ - ], \ + "main": [ \ + { "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/cron.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/index.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/public.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/remote.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/status.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/version.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/core/img/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/core/css/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/core/fonts/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/core/js/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/themes/*" }, "action": { "share": "/var/www/html" } }, \ + { "action": { "pass": "applications/index_php" } } \ + ], \ + "static": [ \ + { "action": { "share": "/var/www/html" } } \ + ], \ + "dynamic": [ \ + { "action": { "pass": "applications/index_php" } } \ + ], \ + "direct": [ \ + { "action": { "pass": "applications/direct_php" } } \ + ], \ }, \ "applications": { \ "index_php": { \ @@ -153,7 +159,7 @@ RUN \ rm /var/www/html/index.php /var/www/html/index.php.remove; \ } -EXPOSE 9000 9001 9002 +EXPOSE 9000 9001 9002 9003 ENTRYPOINT ["/entrypoint.sh"] STOPSIGNAL SIGTERM CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] diff --git a/15.0/unit/Dockerfile b/15.0/unit/Dockerfile index da92199..4a10e5d 100644 --- a/15.0/unit/Dockerfile +++ b/15.0/unit/Dockerfile @@ -103,31 +103,37 @@ RUN \ && unitd --control unix:/var/run/control.unit.sock \ && curl -X PUT --data-binary \ '{ \ - "listeners": { "*:9000": { "pass": "routes/main" } }, \ - "listeners": { "*:9001": { "pass": "routes/dynamic" } }, \ - "listeners": { "*:9002": { "pass": "routes/static" } }, \ + "listeners": { \ + "*:9000": { "pass": "routes/main" }, \ + "*:9001": { "pass": "routes/dynamic" }, \ + "*:9002": { "pass": "routes/static" }, \ + "*:9003": { "pass": "routes/direct" } \ + }, \ "routes": { \ - "main": [ \ - { "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/cron.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/index.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/public.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/remote.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/status.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/version.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/core/img/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/core/css/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/core/fonts/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/core/js/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/themes/*" }, "action": { "share": "/var/www/html" } }, \ - { "action": { "pass": "applications/index_php" } } \ - ], \ - "static": [ \ - { "action": { "share": "/var/www/html" } } \ - ], \ - "dynamic": [ \ - { "action": { "pass": "applications/index_php" } } \ - ], \ + "main": [ \ + { "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/cron.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/index.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/public.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/remote.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/status.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/version.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/core/img/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/core/css/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/core/fonts/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/core/js/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/themes/*" }, "action": { "share": "/var/www/html" } }, \ + { "action": { "pass": "applications/index_php" } } \ + ], \ + "static": [ \ + { "action": { "share": "/var/www/html" } } \ + ], \ + "dynamic": [ \ + { "action": { "pass": "applications/index_php" } } \ + ], \ + "direct": [ \ + { "action": { "pass": "applications/direct_php" } } \ + ], \ }, \ "applications": { \ "index_php": { \ @@ -153,7 +159,7 @@ RUN \ rm /var/www/html/index.php /var/www/html/index.php.remove; \ } -EXPOSE 9000 9001 9002 +EXPOSE 9000 9001 9002 9003 ENTRYPOINT ["/entrypoint.sh"] STOPSIGNAL SIGTERM CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] diff --git a/16.0/unit/Dockerfile b/16.0/unit/Dockerfile index af9849a..be5fa7e 100644 --- a/16.0/unit/Dockerfile +++ b/16.0/unit/Dockerfile @@ -103,31 +103,37 @@ RUN \ && unitd --control unix:/var/run/control.unit.sock \ && curl -X PUT --data-binary \ '{ \ - "listeners": { "*:9000": { "pass": "routes/main" } }, \ - "listeners": { "*:9001": { "pass": "routes/dynamic" } }, \ - "listeners": { "*:9002": { "pass": "routes/static" } }, \ + "listeners": { \ + "*:9000": { "pass": "routes/main" }, \ + "*:9001": { "pass": "routes/dynamic" }, \ + "*:9002": { "pass": "routes/static" }, \ + "*:9003": { "pass": "routes/direct" } \ + }, \ "routes": { \ - "main": [ \ - { "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/cron.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/index.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/public.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/remote.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/status.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/version.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/core/img/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/core/css/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/core/fonts/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/core/js/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/themes/*" }, "action": { "share": "/var/www/html" } }, \ - { "action": { "pass": "applications/index_php" } } \ - ], \ - "static": [ \ - { "action": { "share": "/var/www/html" } } \ - ], \ - "dynamic": [ \ - { "action": { "pass": "applications/index_php" } } \ - ], \ + "main": [ \ + { "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/cron.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/index.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/public.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/remote.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/status.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/version.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/core/img/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/core/css/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/core/fonts/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/core/js/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/themes/*" }, "action": { "share": "/var/www/html" } }, \ + { "action": { "pass": "applications/index_php" } } \ + ], \ + "static": [ \ + { "action": { "share": "/var/www/html" } } \ + ], \ + "dynamic": [ \ + { "action": { "pass": "applications/index_php" } } \ + ], \ + "direct": [ \ + { "action": { "pass": "applications/direct_php" } } \ + ], \ }, \ "applications": { \ "index_php": { \ @@ -153,7 +159,7 @@ RUN \ rm /var/www/html/index.php /var/www/html/index.php.remove; \ } -EXPOSE 9000 9001 9002 +EXPOSE 9000 9001 9002 9003 ENTRYPOINT ["/entrypoint.sh"] STOPSIGNAL SIGTERM CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] diff --git a/17.0/unit/Dockerfile b/17.0/unit/Dockerfile index 2f272b1..9c842d9 100644 --- a/17.0/unit/Dockerfile +++ b/17.0/unit/Dockerfile @@ -103,31 +103,37 @@ RUN \ && unitd --control unix:/var/run/control.unit.sock \ && curl -X PUT --data-binary \ '{ \ - "listeners": { "*:9000": { "pass": "routes/main" } }, \ - "listeners": { "*:9001": { "pass": "routes/dynamic" } }, \ - "listeners": { "*:9002": { "pass": "routes/static" } }, \ + "listeners": { \ + "*:9000": { "pass": "routes/main" }, \ + "*:9001": { "pass": "routes/dynamic" }, \ + "*:9002": { "pass": "routes/static" }, \ + "*:9003": { "pass": "routes/direct" } \ + }, \ "routes": { \ - "main": [ \ - { "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/cron.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/index.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/public.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/remote.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/status.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/version.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/core/img/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/core/css/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/core/fonts/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/core/js/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/themes/*" }, "action": { "share": "/var/www/html" } }, \ - { "action": { "pass": "applications/index_php" } } \ - ], \ - "static": [ \ - { "action": { "share": "/var/www/html" } } \ - ], \ - "dynamic": [ \ - { "action": { "pass": "applications/index_php" } } \ - ], \ + "main": [ \ + { "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/cron.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/index.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/public.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/remote.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/status.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/version.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/core/img/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/core/css/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/core/fonts/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/core/js/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/themes/*" }, "action": { "share": "/var/www/html" } }, \ + { "action": { "pass": "applications/index_php" } } \ + ], \ + "static": [ \ + { "action": { "share": "/var/www/html" } } \ + ], \ + "dynamic": [ \ + { "action": { "pass": "applications/index_php" } } \ + ], \ + "direct": [ \ + { "action": { "pass": "applications/direct_php" } } \ + ], \ }, \ "applications": { \ "index_php": { \ @@ -153,7 +159,7 @@ RUN \ rm /var/www/html/index.php /var/www/html/index.php.remove; \ } -EXPOSE 9000 9001 9002 +EXPOSE 9000 9001 9002 9003 ENTRYPOINT ["/entrypoint.sh"] STOPSIGNAL SIGTERM CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] diff --git a/Dockerfile-unit.template b/Dockerfile-unit.template index f0ef0d0..a35057b 100644 --- a/Dockerfile-unit.template +++ b/Dockerfile-unit.template @@ -109,30 +109,30 @@ RUN \ "*:9003": { "pass": "routes/direct" } \ }, \ "routes": { \ - "main": [ \ - { "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/cron.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/index.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/public.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/remote.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/status.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/version.php" }, "action": { "pass": "applications/direct_php" } }, \ - { "match": { "uri": "/core/img/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/core/css/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/core/fonts/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/core/js/*" }, "action": { "share": "/var/www/html" } }, \ - { "match": { "uri": "/themes/*" }, "action": { "share": "/var/www/html" } }, \ - { "action": { "pass": "applications/index_php" } } \ - ], \ - "static": [ \ - { "action": { "share": "/var/www/html" } } \ - ], \ - "dynamic": [ \ - { "action": { "pass": "applications/index_php" } } \ - ], \ - "direct": [ \ - { "action": { "pass": "applications/direct_php" } } \ - ], \ + "main": [ \ + { "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/cron.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/index.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/public.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/remote.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/status.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/version.php" }, "action": { "pass": "applications/direct_php" } }, \ + { "match": { "uri": "/core/img/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/core/css/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/core/fonts/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/core/js/*" }, "action": { "share": "/var/www/html" } }, \ + { "match": { "uri": "/themes/*" }, "action": { "share": "/var/www/html" } }, \ + { "action": { "pass": "applications/index_php" } } \ + ], \ + "static": [ \ + { "action": { "share": "/var/www/html" } } \ + ], \ + "dynamic": [ \ + { "action": { "pass": "applications/index_php" } } \ + ], \ + "direct": [ \ + { "action": { "pass": "applications/direct_php" } } \ + ], \ }, \ "applications": { \ "index_php": { \