File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,16 @@ echo "Pulled jwilder/nginx-proxy and jrcs/letsencrypt-nginx-proxy-companion"
31
31
32
32
# This updates nginx for all vhosts
33
33
NGINX_CONFIG=" client_max_body_size $CLIENT_UPLOAD_LIMIT ;" ;
34
- echo $NGINX_CONFIG >> /opt/$APPNAME /config/nginx-default.conf
34
+ NGINX_CONFIG_PATH=" /opt/$APPNAME /config/nginx-default.conf"
35
+
36
+ # Only add if it doesn't already exist
37
+ # The value should only change when `mup proxy reconfig-shared` is run
38
+ # That also resets the config, allowing this line to be added again with the new value
39
+ # If the user's custom config already has this option, or a comment
40
+ # containing this option, then the config will not be modified
41
+ if ! grep -q " client_max_body_size" " $NGINX_CONFIG_PATH " ; then
42
+ echo $NGINX_CONFIG >> /opt/$APPNAME /config/nginx-default.conf
43
+ fi
35
44
36
45
sudo docker run \
37
46
-d \
Original file line number Diff line number Diff line change @@ -186,10 +186,9 @@ export function reconfigShared(api) {
186
186
} ) ;
187
187
188
188
const sharedNginxConfig = shared . nginxConfig || api . resolvePath ( __dirname , 'assets/proxy.conf' ) ;
189
-
190
189
list . copy ( 'Sending nginx config' , {
191
190
src : sharedNginxConfig ,
192
- dest : `/opt/${ PROXY_CONTAINER_NAME } /nginx-default.conf`
191
+ dest : `/opt/${ PROXY_CONTAINER_NAME } /config/ nginx-default.conf`
193
192
} ) ;
194
193
195
194
const sessions = api . getSessions ( [ 'app' ] ) ;
You can’t perform that action at this time.
0 commit comments