Docker: Publish ports to localhost + proxy to ip to reduce lookups.
This commit is contained in:
parent
449dcb61ed
commit
8b8e7505eb
9 changed files with 18 additions and 18 deletions
|
@ -4,6 +4,6 @@ services:
|
||||||
image: vectorim/element-web:latest
|
image: vectorim/element-web:latest
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- {{ ports['element'] }}:80
|
- 127.0.0.1:{{ ports['element'] }}:80
|
||||||
volumes:
|
volumes:
|
||||||
- ./config.json:/app/config.json
|
- ./config.json:/app/config.json
|
||||||
|
|
|
@ -10,6 +10,6 @@ services:
|
||||||
AUTO_UPDATE: 'true'
|
AUTO_UPDATE: 'true'
|
||||||
TIME_ZONE: {{ timezone }}
|
TIME_ZONE: {{ timezone }}
|
||||||
ports:
|
ports:
|
||||||
- {{ ports['etebase'] }}:3735
|
- 127.0.0.1:{{ ports['etebase'] }}:3735
|
||||||
volumes:
|
volumes:
|
||||||
- {{ volumes['etebase_datadir'] }}:/data
|
- {{ volumes['etebase_datadir'] }}:/data
|
||||||
|
|
|
@ -15,7 +15,7 @@ services:
|
||||||
- CMD_DOMAIN=hedgedoc.{{ domain }}
|
- CMD_DOMAIN=hedgedoc.{{ domain }}
|
||||||
- CMD_PROTOCOL_USESSL=true
|
- CMD_PROTOCOL_USESSL=true
|
||||||
ports:
|
ports:
|
||||||
- {{ ports['hedgedoc'] }}:3000
|
- 127.0.0.1:{{ ports['hedgedoc'] }}:3000
|
||||||
volumes:
|
volumes:
|
||||||
- {{ volumes['hedgedoc_configdir'] }}:/config
|
- {{ volumes['hedgedoc_configdir'] }}:/config
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ services:
|
||||||
container_name: homepage
|
container_name: homepage
|
||||||
user: {{ users['homepage'] }}:{{ users['homepage'] }}
|
user: {{ users['homepage'] }}:{{ users['homepage'] }}
|
||||||
ports:
|
ports:
|
||||||
- {{ ports['homepage'] }}:80
|
- 127.0.0.1:{{ ports['homepage'] }}:80
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx.conf:/etc/nginx/nginx.conf
|
- ./nginx.conf:/etc/nginx/nginx.conf
|
||||||
- ./index:/mnt/index
|
- ./index:/mnt/index
|
||||||
|
|
|
@ -40,7 +40,7 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://localhost:{{ ports['homepage'] }};
|
proxy_pass http://127.0.0.1:{{ ports['homepage'] }};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ server {
|
||||||
server_name element.{{ domain }};
|
server_name element.{{ domain }};
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://localhost:{{ ports['element'] }};
|
proxy_pass http://127.0.0.1:{{ ports['element'] }};
|
||||||
|
|
||||||
add_header X-Frame-Options SAMEORIGIN;
|
add_header X-Frame-Options SAMEORIGIN;
|
||||||
add_header X-Content-Type-Options nosniff;
|
add_header X-Content-Type-Options nosniff;
|
||||||
|
@ -86,7 +86,7 @@ server {
|
||||||
server_name etebase.{{ domain }};
|
server_name etebase.{{ domain }};
|
||||||
|
|
||||||
location ~ ^/(?!admin) {
|
location ~ ^/(?!admin) {
|
||||||
proxy_pass http://localhost:{{ ports['etebase'] }};
|
proxy_pass http://127.0.0.1:{{ ports['etebase'] }};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,11 +99,11 @@ server {
|
||||||
server_name hedgedoc.{{ domain }};
|
server_name hedgedoc.{{ domain }};
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://localhost:{{ ports['hedgedoc'] }};
|
proxy_pass http://127.0.0.1:{{ ports['hedgedoc'] }};
|
||||||
}
|
}
|
||||||
|
|
||||||
location /socket.io/ {
|
location /socket.io/ {
|
||||||
proxy_pass http://localhost:{{ ports['hedgedoc'] }};
|
proxy_pass http://127.0.0.1:{{ ports['hedgedoc'] }};
|
||||||
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection $http_connection;
|
proxy_set_header Connection $http_connection;
|
||||||
|
@ -119,7 +119,7 @@ server {
|
||||||
server_name searx.{{ domain }};
|
server_name searx.{{ domain }};
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://localhost:{{ ports['searxng'] }};
|
proxy_pass http://127.0.0.1:{{ ports['searxng'] }};
|
||||||
|
|
||||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
||||||
add_header Set-Cookie "Path=/; HttpOnly; Secure";
|
add_header Set-Cookie "Path=/; HttpOnly; Secure";
|
||||||
|
@ -136,7 +136,7 @@ server {
|
||||||
server_name matrix.{{ domain }};
|
server_name matrix.{{ domain }};
|
||||||
|
|
||||||
location ~ ^(/_matrix|/_synapse/client) {
|
location ~ ^(/_matrix|/_synapse/client) {
|
||||||
proxy_pass http://localhost:{{ ports['synapse'] }};
|
proxy_pass http://127.0.0.1:{{ ports['synapse'] }};
|
||||||
|
|
||||||
# Nginx by default only allows file uploads up to 1M in size
|
# Nginx by default only allows file uploads up to 1M in size
|
||||||
# Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
|
# Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
|
||||||
|
@ -152,7 +152,7 @@ server {
|
||||||
# Syncthing Discovery
|
# Syncthing Discovery
|
||||||
upstream stdisco.{{ domain }} {
|
upstream stdisco.{{ domain }} {
|
||||||
# Local IP address:port for discovery server
|
# Local IP address:port for discovery server
|
||||||
server localhost:{{ ports['syncthing_discosrv'] }};
|
server 127.0.0.1:{{ ports['syncthing_discosrv'] }};
|
||||||
}
|
}
|
||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 443 ssl http2;
|
||||||
|
@ -176,7 +176,7 @@ server {
|
||||||
# Vaultwarden
|
# Vaultwarden
|
||||||
upstream vaultwarden-default {
|
upstream vaultwarden-default {
|
||||||
zone vaultwarden-default 64k;
|
zone vaultwarden-default 64k;
|
||||||
server localhost:{{ ports['vaultwarden'] }};
|
server 127.0.0.1:{{ ports['vaultwarden'] }};
|
||||||
keepalive 2;
|
keepalive 2;
|
||||||
}
|
}
|
||||||
server {
|
server {
|
||||||
|
|
|
@ -22,7 +22,7 @@ services:
|
||||||
- SEARXNG_BASE_URL=https://searx.{{ domain }}
|
- SEARXNG_BASE_URL=https://searx.{{ domain }}
|
||||||
- SEARXNG_SECRET={{ searxng_secrets['searxng_secret'] }}
|
- SEARXNG_SECRET={{ searxng_secrets['searxng_secret'] }}
|
||||||
ports:
|
ports:
|
||||||
- {{ ports['searxng'] }}:8080
|
- 127.0.0.1:{{ ports['searxng'] }}:8080
|
||||||
volumes:
|
volumes:
|
||||||
- ./settings.yml:/etc/searxng/settings.yml
|
- ./settings.yml:/etc/searxng/settings.yml
|
||||||
- ./limiter.toml:/etc/searxng/limiter.toml
|
- ./limiter.toml:/etc/searxng/limiter.toml
|
||||||
|
|
|
@ -21,7 +21,7 @@ services:
|
||||||
GID: {{ users['synapse'] }}
|
GID: {{ users['synapse'] }}
|
||||||
TZ: {{ timezone }}
|
TZ: {{ timezone }}
|
||||||
ports:
|
ports:
|
||||||
- {{ ports['synapse'] }}:8008
|
- 127.0.0.1:{{ ports['synapse'] }}:8008
|
||||||
volumes:
|
volumes:
|
||||||
- {{ volumes['synapse_datadir'] }}:/data
|
- {{ volumes['synapse_datadir'] }}:/data
|
||||||
- ./homeserver.yaml:/data/homeserver.yaml
|
- ./homeserver.yaml:/data/homeserver.yaml
|
||||||
|
|
|
@ -8,7 +8,7 @@ services:
|
||||||
- PUID={{ users['syncthing'] }}
|
- PUID={{ users['syncthing'] }}
|
||||||
- PGID={{ users['syncthing'] }}
|
- PGID={{ users['syncthing'] }}
|
||||||
ports:
|
ports:
|
||||||
- {{ ports['syncthing_webui'] }}:8384 # Web UI
|
- 127.0.0.1:{{ ports['syncthing_webui'] }}:8384 # Web UI
|
||||||
- {{ ports['syncthing_tcp'] }}:22000/tcp # TCP file transfers
|
- {{ ports['syncthing_tcp'] }}:22000/tcp # TCP file transfers
|
||||||
- {{ ports['syncthing_udp'] }}:22000/udp # QUIC file transfers
|
- {{ ports['syncthing_udp'] }}:22000/udp # QUIC file transfers
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -29,7 +29,7 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- discosrv
|
- discosrv
|
||||||
ports:
|
ports:
|
||||||
- {{ ports['syncthing_discosrv'] }}:8443
|
- 127.0.0.1:{{ ports['syncthing_discosrv'] }}:8443
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
discosrv:
|
discosrv:
|
||||||
|
|
|
@ -9,6 +9,6 @@ services:
|
||||||
- SIGNUPS_ALLOWED=false
|
- SIGNUPS_ALLOWED=false
|
||||||
- INVITATIONS_ALLOWED=false
|
- INVITATIONS_ALLOWED=false
|
||||||
ports:
|
ports:
|
||||||
- {{ ports['vaultwarden'] }}:80
|
- 127.0.0.1:{{ ports['vaultwarden'] }}:80
|
||||||
volumes:
|
volumes:
|
||||||
- {{ volumes['vaultwarden_datadir' ] }}:/data
|
- {{ volumes['vaultwarden_datadir' ] }}:/data
|
||||||
|
|
Loading…
Reference in a new issue