Allow dynamic Caddy port configuration
This commit is contained in:
@@ -3,7 +3,9 @@ build
|
|||||||
cache
|
cache
|
||||||
stacks
|
stacks
|
||||||
config.php
|
config.php
|
||||||
|
Caddyfile
|
||||||
.cache
|
.cache
|
||||||
.config
|
.config
|
||||||
.local
|
.local
|
||||||
*.phar
|
*.phar
|
||||||
|
.phpunit.*
|
||||||
@@ -21,6 +21,22 @@ echo "<?php return array(" \
|
|||||||
" 'log.level' => Monolog\Logger::INFO, " \
|
" 'log.level' => Monolog\Logger::INFO, " \
|
||||||
" ); " > config.php
|
" ); " > config.php
|
||||||
|
|
||||||
|
if [ ! -z $RUN_ON_HTTP_PORT ]; then
|
||||||
|
# We need to create a Caddyfile that exposes this port
|
||||||
|
echo "http://:$RUN_ON_HTTP_PORT {\n" \
|
||||||
|
" root * /www/public/\n" \
|
||||||
|
" php_fastcgi localhost:9000\n" \
|
||||||
|
" try_files {path} /index.php\n" \
|
||||||
|
" file_server\n" \
|
||||||
|
" header -Via {\n" \
|
||||||
|
" defer\n" \
|
||||||
|
" }\n" \
|
||||||
|
"}\n" > Caddyfile
|
||||||
|
|
||||||
|
echo "Configured an HTTP (unencrypted) webserver on port $RUN_ON_HTTP_PORT";
|
||||||
|
fi
|
||||||
|
|
||||||
# Make cache folder
|
# Make cache folder
|
||||||
|
|
||||||
mkdir cache
|
mkdir cache
|
||||||
chown www-data:www-data cache
|
chown www-data:www-data cache
|
||||||
|
|||||||
Reference in New Issue
Block a user