diff --git a/src/plugins/proxy/assets/templates/start.sh b/src/plugins/proxy/assets/templates/start.sh index 2bcc7be5..d883d978 100644 --- a/src/plugins/proxy/assets/templates/start.sh +++ b/src/plugins/proxy/assets/templates/start.sh @@ -48,7 +48,6 @@ NGINX_CONFIG_PATH="/opt/$APPNAME/config/nginx-default.conf" if ! grep -q "client_max_body_size" "$NGINX_CONFIG_PATH"; then echo $NGINX_CONFIG >> /opt/$APPNAME/config/nginx-default.conf fi - sudo docker run \ -d \ -p $HTTP_PORT:80 \ @@ -64,6 +63,7 @@ sudo docker run \ -v /opt/$APPNAME/config/html:/usr/share/nginx/html \ -v /opt/$APPNAME/config/nginx-default.conf:/etc/nginx/conf.d/my_proxy.conf:ro \ -v /var/run/docker.sock:/tmp/docker.sock:ro \ + <% for(var volume in volumes) { %>-v <%= volume %>:<%= volumes[volume] %> <% } %> \ jwilder/nginx-proxy echo "Ran nginx-proxy as $APPNAME" diff --git a/src/plugins/proxy/command-handlers.js b/src/plugins/proxy/command-handlers.js index 85dc612c..a5075215 100644 --- a/src/plugins/proxy/command-handlers.js +++ b/src/plugins/proxy/command-handlers.js @@ -71,6 +71,7 @@ export function setup(api) { vars: { appName: PROXY_CONTAINER_NAME, letsEncryptEmail: config.ssl ? config.ssl.letsEncryptEmail : null, + volumes: config.volumes, swarmEnabled: api.getConfig().swarm } }); diff --git a/src/plugins/proxy/validate.js b/src/plugins/proxy/validate.js index 7ed721e9..7f6a0990 100644 --- a/src/plugins/proxy/validate.js +++ b/src/plugins/proxy/validate.js @@ -14,6 +14,7 @@ const schema = joi.object().keys({ .or('letsEncryptEmail', 'crt', 'forceSSL'), domains: joi.string().required(), nginxServerConfig: joi.string(), + volumes: joi.object(), nginxLocationConfig: joi.string(), clientUploadLimit: joi.string(), servers: joi.object(),