From 89a88a082ee462fc18322231841e376f1bfb57f4 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Sun, 21 Oct 2018 00:16:37 -0400 Subject: [PATCH] Set up nginx proxy environment variables --- Makefile | 5 ++++- configuration.yaml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5a7b7e9..4c5a203 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,10 @@ IMAGE = homeassistant/home-assistant CONTAINER = home-assistant +HOSTNAME = hass.phoenixinquis.is-a-geek.org HA_VERSION = $(shell cat .HA_VERSION) HASS_BIN = python -m homeassistant VOLUMES = $(PWD):/config /etc/localtime:/etc/localtime:ro +ENV_VARS = VIRTUAL_HOST=$(HOSTNAME) VIRTUAL_IP=127.0.0.1 VIRTUAL_PORT=8123 LETSENCRYPT_HOST=$(HOSTNAME) LETSENCRYPT_EMAIL=correl@gmail.com HASS = docker run -it --rm \ $(addprefix -v ,$(VOLUMES)) \ $(IMAGE) $(HASS_BIN) \ @@ -16,8 +18,9 @@ test: pull run: pull docker run -d \ --name $(CONTAINER) \ - $(addprefix -v ,$(VOLUMES)) \ --net=host \ + $(addprefix -v ,$(VOLUMES)) \ + $(addprefix -e ,$(ENV_VARS)) \ $(IMAGE):$(HA_VERSION) stop: docker stop $(CONTAINER) diff --git a/configuration.yaml b/configuration.yaml index 3113aab..1308b5d 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -28,7 +28,7 @@ http: api_password: !secret http_password # Uncomment this if you are using SSL/TLS, running in Docker container, etc. base_url: hass.phoenixinquis.is-a-geek.org - server_port: 8199 + server_port: 8123 # Checks for available updates # Note: This component will send some information about your system to