version: '3.6' networks: {% if open_asfa_behind_haproxy %} haproxy-public: external: true {% endif %} {{ open_asfa_docker_network }}: services: {{ open_asfa_docker_service_server_name }}: image: {{ open_asfa_docker_server_image }} networks: - {{ open_asfa_docker_network }} {% if open_asfa_behind_haproxy %} - haproxy-public {% endif %} environment: SERVER_PORT: 8080 #DB_HOST: {{ open_asfa_docker_service_server_name }}_pg DB_HOST: {{ open_asfa_db_host }} DB_PORT: {{ open_asfa_db_port }} SCHEMA: {{ open_asfa_db_name }} DB_USER: {{ open_asfa_db_user }} DB_PASSWORD: {{ open_asfa_db_pwd }} deploy: mode: replicated replicas: 1 endpoint_mode: dnsrr placement: constraints: [node.role == worker] restart_policy: condition: on-failure delay: 5s max_attempts: 3 window: 120s logging: driver: 'journald' {{ open_asfa_docker_service_client_name }}: image: {{ open_asfa_docker_client_image }} networks: - {{ open_asfa_docker_network }} {% if open_asfa_behind_haproxy %} - haproxy-public {% endif %} environment: API_BASE_URL: http://{{ open_asfa_docker_service_server_name }}:8080 deploy: mode: replicated replicas: 1 endpoint_mode: dnsrr placement: constraints: [node.role == worker] restart_policy: condition: on-failure delay: 5s max_attempts: 3 window: 120s logging: driver: 'journald'