mirror of
https://github.com/matter-labs/ansible-en-role.git
synced 2025-12-06 10:59:56 +00:00
feat: add basic auth for external node
This commit is contained in:
@ -62,6 +62,11 @@ enable_tls: false
|
|||||||
acme_email: ""
|
acme_email: ""
|
||||||
domain_name: ""
|
domain_name: ""
|
||||||
|
|
||||||
|
# Enable basic auth for external node
|
||||||
|
enable_basic_auth: false
|
||||||
|
basic_auth_username: ""
|
||||||
|
basic_auth_secret: ""
|
||||||
|
|
||||||
# Force restore pg database
|
# Force restore pg database
|
||||||
force_pg_restore: false
|
force_pg_restore: false
|
||||||
|
|
||||||
|
|||||||
@ -69,6 +69,10 @@ services:
|
|||||||
- "traefik.http.routers.external_node_health.rule=PathPrefix(`/`)"
|
- "traefik.http.routers.external_node_health.rule=PathPrefix(`/`)"
|
||||||
- "traefik.http.routers.external_node_health.entrypoints=external_node_health"
|
- "traefik.http.routers.external_node_health.entrypoints=external_node_health"
|
||||||
- "traefik.http.routers.external_node_health.service=external_node_health"
|
- "traefik.http.routers.external_node_health.service=external_node_health"
|
||||||
|
{% if enable_basic_auth %}
|
||||||
|
- "traefik.http.routers.external_node_main.middlewares=external_node_auth"
|
||||||
|
- "traefik.http.middlewares.external_node_auth.basicauth.users={{ basic_auth_username }}:{{ basic_auth_secret }}"
|
||||||
|
{% endif %}
|
||||||
expose:
|
expose:
|
||||||
- {{ rpc_http_port }}
|
- {{ rpc_http_port }}
|
||||||
- {{ rpc_ws_port }}
|
- {{ rpc_ws_port }}
|
||||||
|
|||||||
Reference in New Issue
Block a user