Skip to content

Commit

Permalink
use separate fileshares for external and internal gitea servers
Browse files Browse the repository at this point in the history
  • Loading branch information
craddm committed Aug 2, 2024
1 parent cb242ac commit d499684
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions data_safe_haven/infrastructure/programs/sre/gitea_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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="[email protected]",
admin_username="dshadmin",
Expand Down

0 comments on commit d499684

Please sign in to comment.