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,9 +103,12 @@ RUN \
&& unitd --control unix:/var/run/control.unit.sock \ && unitd --control unix:/var/run/control.unit.sock \
&& curl -X PUT --data-binary \ && curl -X PUT --data-binary \
'{ \ '{ \
"listeners": { "*:9000": { "pass": "routes/main" } }, \ "listeners": { \
"listeners": { "*:9001": { "pass": "routes/dynamic" } }, \ "*:9000": { "pass": "routes/main" }, \
"listeners": { "*:9002": { "pass": "routes/static" } }, \ "*:9001": { "pass": "routes/dynamic" }, \
"*:9002": { "pass": "routes/static" }, \
"*:9003": { "pass": "routes/direct" } \
}, \
"routes": { \ "routes": { \
"main": [ \ "main": [ \
{ "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \ { "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \
@ -128,6 +131,9 @@ RUN \
"dynamic": [ \ "dynamic": [ \
{ "action": { "pass": "applications/index_php" } } \ { "action": { "pass": "applications/index_php" } } \
], \ ], \
"direct": [ \
{ "action": { "pass": "applications/direct_php" } } \
], \
}, \ }, \
"applications": { \ "applications": { \
"index_php": { \ "index_php": { \
@ -153,7 +159,7 @@ RUN \
rm /var/www/html/index.php /var/www/html/index.php.remove; \ rm /var/www/html/index.php /var/www/html/index.php.remove; \
} }
EXPOSE 9000 9001 9002 EXPOSE 9000 9001 9002 9003
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]

View File

@ -103,9 +103,12 @@ RUN \
&& unitd --control unix:/var/run/control.unit.sock \ && unitd --control unix:/var/run/control.unit.sock \
&& curl -X PUT --data-binary \ && curl -X PUT --data-binary \
'{ \ '{ \
"listeners": { "*:9000": { "pass": "routes/main" } }, \ "listeners": { \
"listeners": { "*:9001": { "pass": "routes/dynamic" } }, \ "*:9000": { "pass": "routes/main" }, \
"listeners": { "*:9002": { "pass": "routes/static" } }, \ "*:9001": { "pass": "routes/dynamic" }, \
"*:9002": { "pass": "routes/static" }, \
"*:9003": { "pass": "routes/direct" } \
}, \
"routes": { \ "routes": { \
"main": [ \ "main": [ \
{ "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \ { "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \
@ -128,6 +131,9 @@ RUN \
"dynamic": [ \ "dynamic": [ \
{ "action": { "pass": "applications/index_php" } } \ { "action": { "pass": "applications/index_php" } } \
], \ ], \
"direct": [ \
{ "action": { "pass": "applications/direct_php" } } \
], \
}, \ }, \
"applications": { \ "applications": { \
"index_php": { \ "index_php": { \
@ -153,7 +159,7 @@ RUN \
rm /var/www/html/index.php /var/www/html/index.php.remove; \ rm /var/www/html/index.php /var/www/html/index.php.remove; \
} }
EXPOSE 9000 9001 9002 EXPOSE 9000 9001 9002 9003
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]

View File

@ -103,9 +103,12 @@ RUN \
&& unitd --control unix:/var/run/control.unit.sock \ && unitd --control unix:/var/run/control.unit.sock \
&& curl -X PUT --data-binary \ && curl -X PUT --data-binary \
'{ \ '{ \
"listeners": { "*:9000": { "pass": "routes/main" } }, \ "listeners": { \
"listeners": { "*:9001": { "pass": "routes/dynamic" } }, \ "*:9000": { "pass": "routes/main" }, \
"listeners": { "*:9002": { "pass": "routes/static" } }, \ "*:9001": { "pass": "routes/dynamic" }, \
"*:9002": { "pass": "routes/static" }, \
"*:9003": { "pass": "routes/direct" } \
}, \
"routes": { \ "routes": { \
"main": [ \ "main": [ \
{ "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \ { "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \
@ -128,6 +131,9 @@ RUN \
"dynamic": [ \ "dynamic": [ \
{ "action": { "pass": "applications/index_php" } } \ { "action": { "pass": "applications/index_php" } } \
], \ ], \
"direct": [ \
{ "action": { "pass": "applications/direct_php" } } \
], \
}, \ }, \
"applications": { \ "applications": { \
"index_php": { \ "index_php": { \
@ -153,7 +159,7 @@ RUN \
rm /var/www/html/index.php /var/www/html/index.php.remove; \ rm /var/www/html/index.php /var/www/html/index.php.remove; \
} }
EXPOSE 9000 9001 9002 EXPOSE 9000 9001 9002 9003
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]

View File

@ -103,9 +103,12 @@ RUN \
&& unitd --control unix:/var/run/control.unit.sock \ && unitd --control unix:/var/run/control.unit.sock \
&& curl -X PUT --data-binary \ && curl -X PUT --data-binary \
'{ \ '{ \
"listeners": { "*:9000": { "pass": "routes/main" } }, \ "listeners": { \
"listeners": { "*:9001": { "pass": "routes/dynamic" } }, \ "*:9000": { "pass": "routes/main" }, \
"listeners": { "*:9002": { "pass": "routes/static" } }, \ "*:9001": { "pass": "routes/dynamic" }, \
"*:9002": { "pass": "routes/static" }, \
"*:9003": { "pass": "routes/direct" } \
}, \
"routes": { \ "routes": { \
"main": [ \ "main": [ \
{ "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \ { "match": { "uri": "/console.php" }, "action": { "pass": "applications/direct_php" } }, \
@ -128,6 +131,9 @@ RUN \
"dynamic": [ \ "dynamic": [ \
{ "action": { "pass": "applications/index_php" } } \ { "action": { "pass": "applications/index_php" } } \
], \ ], \
"direct": [ \
{ "action": { "pass": "applications/direct_php" } } \
], \
}, \ }, \
"applications": { \ "applications": { \
"index_php": { \ "index_php": { \
@ -153,7 +159,7 @@ RUN \
rm /var/www/html/index.php /var/www/html/index.php.remove; \ rm /var/www/html/index.php /var/www/html/index.php.remove; \
} }
EXPOSE 9000 9001 9002 EXPOSE 9000 9001 9002 9003
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]