diff --git a/synclounge-server.subfolder.conf.sample b/synclounge-server.subfolder.conf.sample new file mode 100644 index 0000000..30f9138 --- /dev/null +++ b/synclounge-server.subfolder.conf.sample @@ -0,0 +1,29 @@ +#******** Due to some bugs in SyncLounge, this config may conflict with others. ********* + +# SyncLounge defaults the server to `slserver` already +location /slserver { + include /config/nginx/proxy.conf; + resolver 127.0.0.11 valid=30s; + set $upstream_app synclounge; + set $upstream_port 8089; + set $upstream_proto http; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + proxy_pass $upstream_proto://$upstream_app:$upstream_port; +} + +# Due to a bug in SyncLounge, some websockets calls don't respect the base url (server root) setting +# TODO: Update when fixed +location /socket.io { + resolver 127.0.0.11 valid=30s; + set $upstream_app synclounge; + set $upstream_port 8089; + set $upstream_proto http; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + proxy_pass $upstream_proto://$upstream_app:$upstream_port/slserver/socket.io/; +} \ No newline at end of file diff --git a/synclounge.subfolder.conf.sample b/synclounge.subfolder.conf.sample new file mode 100644 index 0000000..bc433ae --- /dev/null +++ b/synclounge.subfolder.conf.sample @@ -0,0 +1,29 @@ +#******** Due to some bugs in SyncLounge, this config may conflict with others. ********* + +# Set `webroot` to `slweb` and restart the container +location /slweb { + include /config/nginx/proxy.conf; + resolver 127.0.0.11 valid=30s; + set $upstream_app synclounge; + set $upstream_port 8088; + set $upstream_proto http; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + proxy_pass $upstream_proto://$upstream_app:$upstream_port; +} + +# Due to a bug in SyncLounge, some requests like /config don't respect the web's base url setting (webroot) +# TODO: Update when fixed +location /config { + return 301 $scheme://$host/slweb$request_uri; +} + +# Invite links need to be rewritten to use the web's base url setting (webroot) +# The docker container currently sets `autoJoinUrl` ENV variable on build to `http://${DOMAIN}` +# overriding what the user has set. +# TODO: Update when fixed +location /invite/ { + return 301 $scheme://$host/slweb$request_uri; +} \ No newline at end of file