fix unit config
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Mauro Torrez 2019-10-11 23:20:38 -03:00
parent 3eda2c7d68
commit a76ad6f775
5 changed files with 148 additions and 124 deletions

View File

@ -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"]

View File

@ -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"]

View File

@ -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"]

View File

@ -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"]

View File

@ -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": { \