Fix content audit findings across Serveex, Nonsense and recycled guides
This commit is contained in:
@@ -101,32 +101,25 @@ We assume you've created a subdomain in your [DNS zone](/general/networking/dns)
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
### Add UpSnap's network to SWAG
|
||||
### Make the host reachable from SWAG
|
||||
|
||||
Go to Dockge, and edit the SWAG compose by adding the UpSnap network:
|
||||
UpSnap runs with `network_mode: host` (needed for Wake-on-LAN broadcasts and network scanning to work reliably), so it never joins a Docker network SWAG could attach to like other stacks. Instead, give SWAG a way to reach the host itself:
|
||||
|
||||
```yaml [compose.yaml]
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Connects the container to the custom network
|
||||
# ...
|
||||
- upsnap # Network name declared in the stack
|
||||
|
||||
networks: # Defines the custom network
|
||||
# ...
|
||||
upsnap: # Network name declared in the stack
|
||||
name: upsnap_default # Actual name of the external network
|
||||
external: true # Indicates it's an external network
|
||||
# ...
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway" # resolves to the Docker host's own IP
|
||||
```
|
||||
|
||||
Restart the stack by clicking "deploy" and wait for SWAG to be fully operational.
|
||||
|
||||
::note
|
||||
|
||||
Here we assume the network name for upsnap is `upsnap_default`. You can check the connection in the SWAG dashboard at `http://yourserverip:81`.
|
||||
`host-gateway` is a special value Docker resolves to the host machine's IP automatically, so this works regardless of your server's actual address.
|
||||
::
|
||||
|
||||
### Create the subdomain.conf file
|
||||
@@ -184,7 +177,7 @@ server {
|
||||
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app upsnap;
|
||||
set $upstream_app host.docker.internal;
|
||||
set $upstream_port 8095;
|
||||
set $upstream_proto http;
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
@@ -262,7 +255,7 @@ server {
|
||||
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app upsnap;
|
||||
set $upstream_app host.docker.internal;
|
||||
set $upstream_port 8095;
|
||||
set $upstream_proto http;
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
|
||||
Reference in New Issue
Block a user