Name and icon code blocks by real filename across the site
This commit is contained in:
@@ -57,7 +57,7 @@ root
|
||||
|
||||
Open Dockge in your browser, click on `compose`, name the stack `swag`, and copy the following config:
|
||||
|
||||
```yaml
|
||||
```yaml [compose.yaml]
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
@@ -101,7 +101,7 @@ networks:
|
||||
✨ __Tip:__
|
||||
Add the watchtower label to each container to enable automatic updates
|
||||
|
||||
```yaml
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
swag:
|
||||
#...
|
||||
@@ -113,7 +113,7 @@ services:
|
||||
|
||||
Then in the `.env` file:
|
||||
|
||||
```properties
|
||||
```properties [.env]
|
||||
DOMAIN=
|
||||
DOMAINS=
|
||||
EMAIL=
|
||||
@@ -144,7 +144,7 @@ sudo nano /docker/swag/config/dns-conf/ovh.ini
|
||||
|
||||
You should see:
|
||||
|
||||
```properties
|
||||
```properties [ovh.ini]
|
||||
# Instructions: https://github.com/certbot/certbot/blob/master/certbot-dns-ovh/certbot_dns_ovh/__init__.py#L20
|
||||
# Replace with your values
|
||||
dns_ovh_endpoint = ovh-eu
|
||||
@@ -174,7 +174,7 @@ sudo nano /docker/swag/config/nginx/nginx.conf
|
||||
|
||||
Add the following line below the `http` section:
|
||||
|
||||
```nginx
|
||||
```nginx [nginx.conf]
|
||||
include /config/nginx/dbip.conf;
|
||||
```
|
||||
|
||||
@@ -201,7 +201,7 @@ sudo nano /docker/swag/config/nginx/dbip.conf
|
||||
|
||||
Make your changes ([see documentation](https://github.com/linuxserver/docker-mods/tree/swag-dbip)), or use the following example:
|
||||
|
||||
```nginx
|
||||
```nginx [dbip.conf]
|
||||
geoip2 /config/geoip2db/dbip-country-lite.mmdb {
|
||||
auto_reload 1w;
|
||||
$geoip2_data_continent_code continent code;
|
||||
@@ -249,18 +249,29 @@ Save and close the file. Restart the stack.
|
||||
|
||||
In the domain config files (see next section), you can enable or disable the whitelist or blacklist ([see documentation here](https://www.forum-nas.fr/threads/tuto-installer-swag-en-docker-reverse-proxy.15057/)). In our case, the whitelist allows only French requests. The blacklist blocks only the listed countries. We'll use the blacklist, like so:
|
||||
|
||||
```nginx
|
||||
```nginx [some-app.subdomain.conf]{11}
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
|
||||
server_name some-app.*;
|
||||
|
||||
include /config/nginx/ssl.conf;
|
||||
|
||||
client_max_body_size 0;
|
||||
|
||||
if ($geo-blacklist = no) { return 404; }
|
||||
|
||||
location / {
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
|
||||
set $upstream_app some-app;
|
||||
set $upstream_port 1234;
|
||||
set $upstream_proto http;
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Exposing Dockge
|
||||
@@ -284,7 +295,7 @@ sudo nano /docker/swag/config/nginx/proxy-confs/dockge.subdomain.conf
|
||||
|
||||
Configure it like this:
|
||||
|
||||
```nginx
|
||||
```nginx [dockge.subdomain.conf]
|
||||
## Version 2023/12/19
|
||||
|
||||
server {
|
||||
@@ -333,7 +344,7 @@ By default, SWAG doesn’t recognize the name "dockge". You’ll need to add Doc
|
||||
|
||||
Go to the SWAG stack, click `edit`, and modify the config file like this (note the `networks` section):
|
||||
|
||||
```yaml
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
swag:
|
||||
container_name: #...
|
||||
|
||||
Reference in New Issue
Block a user