internal routing in Unit, change port to 8080
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
3993d19e97
commit
1d8ec91a4e
37
Dockerfile
37
Dockerfile
@ -25,7 +25,6 @@ RUN { \
|
||||
echo 'html_errors = Off'; \
|
||||
} > /etc/php/7.3/embed/conf.d/error-logging.ini
|
||||
|
||||
|
||||
VOLUME /var/www/html
|
||||
|
||||
ENV WORDPRESS_VERSION 5.2.3
|
||||
@ -41,7 +40,7 @@ RUN set -ex; \
|
||||
chown -R www-data:www-data /var/www/html
|
||||
|
||||
# port used by the listener in config.json
|
||||
EXPOSE 8090 8091
|
||||
EXPOSE 8080
|
||||
|
||||
# application setup
|
||||
|
||||
@ -52,22 +51,18 @@ RUN \
|
||||
} \
|
||||
&& unitd --control unix:/var/run/control.unit.sock \
|
||||
# upload the app config to Unit
|
||||
&& curl -X PUT --data-binary '{ \
|
||||
"listeners": { \
|
||||
"*:8090": { \
|
||||
"application": "script_index_php" \
|
||||
}, \
|
||||
"*:8091": { \
|
||||
"application": "direct_php" \
|
||||
} \
|
||||
}, \
|
||||
&& curl -X PUT --data-binary \
|
||||
'{ \
|
||||
"listeners": { "*:8080": { "pass": "routes" } }, \
|
||||
"routes": [ \
|
||||
{ "match": { "uri": "*.php" }, "action": { "pass": "applications/direct_php" } }, \
|
||||
{ "action": { "share": "/var/www/html" } }, \
|
||||
{ "action": { "pass": "applications/index_php" } } \
|
||||
], \
|
||||
"applications": { \
|
||||
"script_index_php": { \
|
||||
"index_php": { \
|
||||
"type": "php", \
|
||||
"processes": { \
|
||||
"max": 20, \
|
||||
"spare": 5 \
|
||||
}, \
|
||||
"processes": { "max": 20, "spare": 5 }, \
|
||||
"user": "www-data", \
|
||||
"group": "www-data", \
|
||||
"root": "/var/www/html", \
|
||||
@ -75,17 +70,15 @@ RUN \
|
||||
}, \
|
||||
"direct_php": { \
|
||||
"type": "php", \
|
||||
"processes": { \
|
||||
"max": 5, \
|
||||
"spare": 0 \
|
||||
}, \
|
||||
"processes": { "max": 5, "spare": 0 }, \
|
||||
"user": "www-data", \
|
||||
"group": "www-data", \
|
||||
"root": "/var/www/html", \
|
||||
"script": "index.php" \
|
||||
"index": "index.php" \
|
||||
} \
|
||||
} \
|
||||
}' --unix-socket /var/run/control.unit.sock http://localhost/config/ \
|
||||
}' \
|
||||
--unix-socket /var/run/control.unit.sock http://localhost/config/ \
|
||||
&& [ -f /var/www/html/index.php.remove ] && { \
|
||||
rm /var/www/html/index.php /var/www/html/index.php.remove; \
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user