diff --git a/docker-compose.yml b/docker-compose.yml index e12e2a7..88d7132 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,8 @@ services: image: homeassistant/home-assistant:0.61.1 environment: - "TZ=Europe/Berlin" - - "COFFEE_FLASH_BASE_URL=http://localhost:4444" + - "COFFEE_FLASH_BASE_URL=http://flash-home.duckdns.org:3000/" + - "PROVIDER_FLASH_BASE_URL=http://flash-home.duckdns.org:3001/" ports: - 80:8123 # Home Assistant - 1883:1883 # MQTT diff --git a/fabfile.py b/fabfile.py new file mode 100644 index 0000000..26492ae --- /dev/null +++ b/fabfile.py @@ -0,0 +1,29 @@ +from fabric.api import run, env, task, put, cd, local, sudo + +env.use_ssh_config = True +env.hosts = ['flash_home'] + + +@task(default=True) +def deploy(): + with cd('/srv/flash-home'): + run('git pull origin master') + + run('echo "COFFEE_FLASH_BASE_URL=http://flash-home.duckdns.org:3000/" > .env') + run('echo "PROVIDER_FLASH_BASE_URL=http://flash-home.duckdns.org:3001/" >> .env') + + run('docker-compose --project-name flash-home pull') + run('docker-compose --project-name flash-home up -d --build --force-recreate') + + +@task +def init(): + run('mkdir -p /srv/flash-home/') + with cd('/srv/flash-home'): + run('git clone --recursive https://github.com/jinnerbichler/flash-home') + + +@task +def logs(): + with cd('/srv/flash-home'): + run('docker-compose --project-name flash-home logs -f --tail 100') diff --git a/flash-server b/flash-server index 2e9a98d..ce88546 160000 --- a/flash-server +++ b/flash-server @@ -1 +1 @@ -Subproject commit 2e9a98dfb116149664f51459e2b9619070341cd7 +Subproject commit ce885465002d2411a5aa362cf97b8de27ac0afe4