Chore: Move from remote database host to linked docker container
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user