Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docs/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,14 @@ module.exports = {

// (optional, default=10M) Limit for the size of file uploads.
// Set to 0 disables the limit.
clientUploadLimit: '50M'
clientUploadLimit: '50M',

// lets you add docker volumes to Nginx (optional)
// Can be used to serve static files
volumes: {
// passed as '-v /host/path:/container/path:ro' to the docker run command
'/host/path': '/container/path:ro'
}
}
};
```
Expand Down
1 change: 1 addition & 0 deletions src/plugins/proxy/assets/templates/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,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"

Expand Down
1 change: 1 addition & 0 deletions src/plugins/proxy/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const schema = joi.object().keys({
nginxServerConfig: joi.string(),
nginxLocationConfig: joi.string(),
clientUploadLimit: joi.string(),
volumes: joi.object(),
shared: joi.object().keys({
clientUploadLimit: joi.alternatives().try(joi.number(), joi.string()),
httpPort: joi.number(),
Expand Down