Fix the database hostname
This commit is contained in:
parent
73314b8c2c
commit
329bca69c0
|
@ -9,7 +9,7 @@ open_asfa_docker_network: 'open_asfa_net'
|
||||||
open_asfa_behind_haproxy: True
|
open_asfa_behind_haproxy: True
|
||||||
open_asfa_haproxy_public_net: 'haproxy-public'
|
open_asfa_haproxy_public_net: 'haproxy-public'
|
||||||
# DB
|
# DB
|
||||||
open_asfa_db_image: 'postgres:12-alpine'
|
open_asfa_db_image: 'postgres:12'
|
||||||
#open_asfa_db_pwd: 'set it in a vault file'
|
#open_asfa_db_pwd: 'set it in a vault file'
|
||||||
open_asfa_db_name: 'asfadb'
|
open_asfa_db_name: 'asfadb'
|
||||||
open_asfa_db_user: 'asfadb_user'
|
open_asfa_db_user: 'asfadb_user'
|
||||||
|
|
|
@ -1,27 +1,24 @@
|
||||||
---
|
---
|
||||||
- name: Manage the installation of the OpenASFA configuration of the swarm service
|
- name: Manage the installation of the OpenASFA configuration of the swarm service
|
||||||
block:
|
block:
|
||||||
- name: Create the directory where the dockerfile and the configuration file will be copied into
|
- name: Create the directory where the dockerfile and the configuration file will be copied into
|
||||||
file: dest={{ open_asfa_compose_dir }} state=directory
|
file: dest={{ open_asfa_compose_dir }} state=directory
|
||||||
|
|
||||||
- name: Install the docker compose file
|
- name: Install the docker compose file
|
||||||
template: src=open-asfa-docker-compose.yml.j2 dest={{ open_asfa_compose_dir }}/docker-open-asfa-stack.yml
|
template: src=open-asfa-docker-compose.yml.j2 dest={{ open_asfa_compose_dir }}/docker-open-asfa-stack.yml owner=root group=root mode='0400'
|
||||||
|
|
||||||
- name: Start the OpenAsfa stack
|
- name: Start the OpenAsfa stack
|
||||||
docker_stack:
|
docker_stack:
|
||||||
name: open-asfa
|
name: open-asfa
|
||||||
state: present
|
state: present
|
||||||
compose:
|
compose:
|
||||||
- '{{ open_asfa_compose_dir }}/docker-open-asfa-stack.yml'
|
- '{{ open_asfa_compose_dir }}/docker-open-asfa-stack.yml'
|
||||||
|
|
||||||
- name: Connect the OpenASFA service to the haproxy-public network
|
- name: Connect the OpenASFA service to the haproxy-public network
|
||||||
command: docker service update --network-add {{ open_asfa_haproxy_public_net }} {{ open_asfa_docker_service_name }}_{{ open_asfa_docker_service_server_name }} --update-delay 30s --update-parallelism 1
|
command: docker service update --network-add {{ open_asfa_haproxy_public_net }} {{ open_asfa_docker_service_name }}_{{ open_asfa_docker_service_server_name }} --update-delay 30s --update-parallelism 1
|
||||||
run_once: True
|
ignore_errors: True
|
||||||
ignore_errors: True
|
when: open_asfa_behind_haproxy
|
||||||
when: open_asfa_behind_haproxy
|
|
||||||
|
|
||||||
run_once: True
|
run_once: True
|
||||||
when:
|
when: docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool
|
||||||
- docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool
|
tags: [ 'open_asfa', 'open_asfa_swarm' ]
|
||||||
- shinyproxy_container_backend == 'docker-swarm'
|
|
||||||
tags: [ 'shinyproxy', 'shinyproxy_swarm', 'docker' ]
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ services:
|
||||||
- asfa_pg
|
- asfa_pg
|
||||||
environment:
|
environment:
|
||||||
SERVER_PORT: 8080
|
SERVER_PORT: 8080
|
||||||
DB_HOST: localhost
|
DB_HOST: {{ open_asfa_docker_service_server_name }}_asfa_pg
|
||||||
DB_PORT: 5432
|
DB_PORT: 5432
|
||||||
SCHEMA: {{ open_asfa_db_name }}
|
SCHEMA: {{ open_asfa_db_name }}
|
||||||
DB_USER: {{ open_asfa_db_user }}
|
DB_USER: {{ open_asfa_db_user }}
|
||||||
|
|
Loading…
Reference in New Issue