From 0d8332ec7ee25bd95c3243da0a42a0a5665ab522 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Thu, 20 Aug 2020 15:49:11 +0200 Subject: [PATCH] bundles/gitea: auto-configure nginx vhost --- bundles/gitea/metadata.py | 18 ++++++++++++++++++ nodes/htz/ex42-1048908.py | 5 ----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/bundles/gitea/metadata.py b/bundles/gitea/metadata.py index 51f22ea..c26dd01 100644 --- a/bundles/gitea/metadata.py +++ b/bundles/gitea/metadata.py @@ -30,3 +30,21 @@ defaults = { }, }, } + + +@metadata_reactor +def nginx(metadata): + if not node.has_bundle('nginx'): + raise DoNotRunAgain + + return { + 'nginx': { + 'vhosts': { + metadata.get('gitea/domain'): { + 'proxy': { + '/': 'http://127.0.0.1:3000', + }, + }, + }, + }, + } diff --git a/nodes/htz/ex42-1048908.py b/nodes/htz/ex42-1048908.py index f23daae..808995c 100644 --- a/nodes/htz/ex42-1048908.py +++ b/nodes/htz/ex42-1048908.py @@ -144,11 +144,6 @@ nodes['htz.ex42-1048908'] = { 'webroot': '/var/www/franzi.business/_site/', 'extras': True, }, - 'git.kunsmann.eu': { - 'proxy': { - '/': 'http://localhost:3000/', - }, - }, 'jenkins.kunsmann.eu': { 'proxy': { '/': 'http://localhost:9000/',