diff --git a/deploy.sh b/deploy.sh index 86b6b454..7fe3f466 100755 --- a/deploy.sh +++ b/deploy.sh @@ -32,5 +32,5 @@ else echo "No version bump" fi cd "$parent_path/docker" || exit -docker save brewman:latest | bzip2 | pv | ssh vancity 'bunzip2 | sudo docker load' +docker save brewman:latest | bzip2 | pv | ssh beacon 'bunzip2 | sudo docker load' ansible-playbook --inventory hosts playbook.yml diff --git a/docker/files/.env-acc b/docker/files/.env-acc index b383c999..4ae239f8 100644 --- a/docker/files/.env-acc +++ b/docker/files/.env-acc @@ -2,7 +2,7 @@ HOST=0.0.0.0 PORT=80 LOG_LEVEL=WARN DEBUG=false -SQLALCHEMY_DATABASE_URI=postgresql://postgres:123456@172.26.5.85:5432/acc +SQLALCHEMY_DATABASE_URI=postgresql://postgres:123456@db:5432/acc MODULE_NAME=brewman.main PROJECT_NAME=brewman POSTGRES_SERVER=db diff --git a/docker/files/.env-exp b/docker/files/.env-exp index 868ab8fc..a7bfc0bf 100644 --- a/docker/files/.env-exp +++ b/docker/files/.env-exp @@ -2,7 +2,7 @@ HOST=0.0.0.0 PORT=80 LOG_LEVEL=WARN DEBUG=false -SQLALCHEMY_DATABASE_URI=postgresql://postgres:123456@172.26.5.85:5432/exp +SQLALCHEMY_DATABASE_URI=postgresql://postgres:123456@db:5432/exp MODULE_NAME=brewman.main PROJECT_NAME=brewman POSTGRES_SERVER=db diff --git a/docker/files/.env-hops b/docker/files/.env-hops index ec765483..94a75aee 100644 --- a/docker/files/.env-hops +++ b/docker/files/.env-hops @@ -2,7 +2,7 @@ HOST=0.0.0.0 PORT=80 LOG_LEVEL=WARN DEBUG=false -SQLALCHEMY_DATABASE_URI=postgresql://postgres:123456@172.26.5.85:5432/hops +SQLALCHEMY_DATABASE_URI=postgresql://postgres:123456@db:5432/hops MODULE_NAME=brewman.main PROJECT_NAME=brewman POSTGRES_SERVER=db diff --git a/docker/files/.env-mhl b/docker/files/.env-mhl index cfbdcef4..b72da50e 100644 --- a/docker/files/.env-mhl +++ b/docker/files/.env-mhl @@ -2,7 +2,7 @@ HOST=0.0.0.0 PORT=80 LOG_LEVEL=WARN DEBUG=false -SQLALCHEMY_DATABASE_URI=postgresql://postgres:123456@172.26.5.85:5432/mhl +SQLALCHEMY_DATABASE_URI=postgresql://postgres:123456@db:5432/mhl MODULE_NAME=brewman.main PROJECT_NAME=brewman POSTGRES_SERVER=db diff --git a/docker/hosts b/docker/hosts index e3e1450b..3991070d 100644 --- a/docker/hosts +++ b/docker/hosts @@ -5,10 +5,10 @@ # - A hostname/ip can be a member of multiple groups [brewman] -acc ansible_host=vancity var_file=vars/acc.yml -exp ansible_host=vancity var_file=vars/exp.yml -hops ansible_host=vancity var_file=vars/hops.yml -mhl ansible_host=vancity var_file=vars/mhl.yml +acc ansible_host=beacon var_file=vars/acc.yml +exp ansible_host=beacon var_file=vars/exp.yml +hops ansible_host=beacon var_file=vars/hops.yml +mhl ansible_host=beacon var_file=vars/mhl.yml [all:vars] ansible_python_interpreter=/usr/bin/python3 diff --git a/docker/playbook.yml b/docker/playbook.yml index d4960660..436b08dd 100755 --- a/docker/playbook.yml +++ b/docker/playbook.yml @@ -21,6 +21,11 @@ state: present source: build + - name: Ensure Host Directory exists + file: + path: "/var/lib/{{ host_directory }}" + state: directory + - name: Upload the .env file template: src: "{{ env_file }}" @@ -33,6 +38,8 @@ state: started restart_policy: "unless-stopped" env_file: "/var/lib/{{ host_directory }}/.env" + links: + - "postgres:db" published_ports: - "127.0.0.1:{{ host_port }}:80" volumes: