diff --git a/dsh b/dsh index d826736..0335fbb 100755 --- a/dsh +++ b/dsh @@ -161,8 +161,9 @@ setup() { fi setup_ssh_agent_proxy fi - setup_docker_network setup_nginx_proxy + setup_docker_network + setup_nginx_connect } setup_docker_machine() { @@ -231,8 +232,10 @@ setup_nginx_proxy() { if docker ps -a | grep "nginx-proxy" > /dev/null; then docker start nginx-proxy > /dev/null else + # Configuration is only applied when the container is created. docker run -d -p 80:80 \ -v /var/run/docker.sock:/tmp/docker.sock:ro \ + -v /etc/nginx/conf.d/dsh_proxy.conf:$(pwd)/dsh_proxy.conf \ --restart always --name nginx-proxy \ jwilder/nginx-proxy fi @@ -240,7 +243,9 @@ setup_nginx_proxy() { if ! docker ps | grep "nginx-proxy" > /dev/null; then error "jwilder/nginx-proxy could not be started." fi +} +setup_nginx_connect() { set +e # Test to make sure its not already on the network. if ! docker network inspect ${PROJECT}_default | grep "nginx-proxy" > /dev/null; then diff --git a/dsh_proxy.conf b/dsh_proxy.conf new file mode 100644 index 0000000..86bda51 --- /dev/null +++ b/dsh_proxy.conf @@ -0,0 +1 @@ +client_max_body_size 100m; diff --git a/src/Handler.php b/src/Handler.php index 36ca801..803905e 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -81,6 +81,7 @@ public function updateShepherdScaffoldFiles() $projectPath, [ 'docker-compose.yml', + 'dsh_proxy.conf', 'RoboFile.php', ] );