Skip to content

Commit

Permalink
reverse proxy with swag
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineGlacet committed Jan 7, 2023
1 parent 6c8b1de commit 82e8765
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 24 deletions.
24 changes: 16 additions & 8 deletions HA/config/homeassistant/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,38 @@ homeassistant:
unit_system: metric
media_dirs:
media: /media

# configure trusted proxy for swag
http:
use_x_forwarded_for: true
trusted_proxies:
- 10.13.89.90
- 10.12.12.12

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# panel:
panel_iframe:
router:
title: "Node-Red"
url: "http://10.13.89.90:1880"
icon: si:nodered
# router:
# title: "Node-Red"
# url: "https://10.13.89.90:1880"
# icon: si:nodered
zigbee2mqtt:
title: "Zigbee2MQTT"
url: "http://10.13.89.90:8099"
url: "https://zigbee2mqtt.antoineglacet.com"
icon: si:zigbee
glances:
title: "glances"
url: "http://10.13.89.90:61208"
url: "https://glances.antoineglacet.com"
icon: mdi:docker
vscode:
title: "vscode"
url: "http://10.13.89.90:8443"
url: "https://vscode.antoineglacet.com"
icon: si:visualstudiocode
portainer:
title: "portainer"
url: "http://10.13.89.90:9000"
url: "https://portainer.antoineglacet.com"
icon: si:portainer

# add themes folder
Expand Down
32 changes: 16 additions & 16 deletions HA/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,20 @@ services:
- ./config/zigbee2mqtt:/app/data
devices:
- /dev/ttyACM0
privileged: true
network_mode: host

node-red:
container_name: node-red
image: nodered/node-red:latest
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
volumes:
- ./config/node-red:/data
ports:
- "1880:1880"
restart: unless-stopped
depends_on:
- home-assistant
# frontend, in zigbee's configuration.yaml
- "8099:8099"
# node-red:
# container_name: node-red
# image: nodered/node-red:latest
# environment:
# - PUID=${PUID}
# - PGID=${PGID}
# - TZ=${TZ}
# volumes:
# - ./config/node-red:/data
# ports:
# - "1880:1880"
# restart: unless-stopped
# depends_on:
# - home-assistant
53 changes: 53 additions & 0 deletions tools/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,56 @@ services:
ports:
- 8200:8200
restart: unless-stopped
swag:
image: lscr.io/linuxserver/swag
container_name: swag
cap_add:
- NET_ADMIN
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Tokyo
- URL=antoineglacet.com
- >
SUBDOMAINS=
www,
home,
dashboard,
router,
radarr,
adguard,
plex,
homeassistant,
overseerr,
bazarr,
sonarr,
prowlarr,
transmission,
calibre,
duplicati,
cockpit,
portainer,
zigbee2mqtt,
glances,
portainer,
vscode
- VALIDATION=http
- DOCKER_MODS=linuxserver/mods:swag-auto-reload|linuxserver/mods:swag-dashboard
volumes:
- ./config/swag:/config
ports:
- 443:443
- 80:80
- 81:81
restart: unless-stopped
networks:
swag:
ipv4_address: 10.12.12.12

networks:
swag:
driver: bridge
ipam:
config:
- subnet: 10.12.0.0/16
gateway: 10.12.12.1

0 comments on commit 82e8765

Please sign in to comment.