From d499684154d499f3b7e23d8b61464ed12d211a49 Mon Sep 17 00:00:00 2001 From: Matt Craddock <5796417+craddm@users.noreply.github.com> Date: Fri, 2 Aug 2024 15:07:39 +0000 Subject: [PATCH] use separate fileshares for external and internal gitea servers --- .../infrastructure/programs/sre/gitea_server.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/data_safe_haven/infrastructure/programs/sre/gitea_server.py b/data_safe_haven/infrastructure/programs/sre/gitea_server.py index f6192633f9..8506b22e28 100644 --- a/data_safe_haven/infrastructure/programs/sre/gitea_server.py +++ b/data_safe_haven/infrastructure/programs/sre/gitea_server.py @@ -84,7 +84,7 @@ def __init__( access_tier=storage.ShareAccessTier.COOL, account_name=props.storage_account_name, resource_group_name=props.resource_group_name, - share_name="gitea-caddy", + share_name=f"{props.gitea_server}-gitea-caddy", share_quota=1, signed_identifiers=[], opts=child_opts, @@ -94,7 +94,7 @@ def __init__( access_tier=storage.ShareAccessTier.COOL, account_name=props.storage_account_name, resource_group_name=props.resource_group_name, - share_name="gitea-gitea", + share_name=f"{props.gitea_server}-gitea-gitea", share_quota=1, signed_identifiers=[], opts=child_opts, @@ -119,9 +119,14 @@ def __init__( ) # Upload Gitea configuration script - gitea_configure_sh_reader = FileReader( - resources_path / "gitea" / "gitea" / "configure.mustache.sh" - ) + if props.gitea_server == "external": + gitea_configure_sh_reader = FileReader( + resources_path / "gitea_external" / "gitea" / "configure.mustache.sh" + ) + else: + gitea_configure_sh_reader = FileReader( + resources_path / "gitea" / "gitea" / "configure.mustache.sh" + ) gitea_configure_sh = Output.all( admin_email="dshadmin@example.com", admin_username="dshadmin",