From 070b466abe1baa857b76001e26ac93bacda4fc86 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Tue, 27 Dec 2022 13:38:53 +0100 Subject: [PATCH] bundles/travelynx: update bundle for new version --- bundles/travelynx/files/travelynx.conf | 25 +++++++------------------ bundles/travelynx/items.py | 6 +++--- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/bundles/travelynx/files/travelynx.conf b/bundles/travelynx/files/travelynx.conf index bc8e128..7787d8b 100644 --- a/bundles/travelynx/files/travelynx.conf +++ b/bundles/travelynx/files/travelynx.conf @@ -5,15 +5,13 @@ # 'localhost'. { - # Cache directories for schedule and realtime data. Mandatory. The parent - # directory ('/var/cache/travelynx' in this case) must already exist. + base_url => Mojo::URL->new('https://${domain}'), + cache => { schedule => '/var/cache/travelynx/iris', realtime => '/var/cache/travelynx/iris-rt', }, - # Database configuration. host and port are optional - # (defaulting to localhost:5432), the rest is mandatory. db => { host => '${database.get('host', 'localhost')}', port => 5432, @@ -22,8 +20,6 @@ password => '${database['password']}', }, - # See the Mojo::Server::Hypnotoad manual for details on the following - # settings. hypnotoad => { accepts => 100, clients => 10, @@ -34,21 +30,14 @@ }, mail => { - # If you want to disable outgoing mail for development purposes, - # uncomment the following line. Mails will instead be logged as - # Mojolicious "info" messages, causing their content to be printed on - # stdout. - ## disabled => 1, - - # Otherwise, specify the sender ("From" field) for mail sent by travelynx - # here. E.g. 'Travelynx ' from => '${mail_from}', }, - # Secrets used for cookie signing and verification. Must contain at least - # one random string. If you specify several strings, the first one will - # be used for signing new cookies, and the remaining ones will still be - # accepted for cookie validation. + ref => { + issues => 'https://github.com/derf/travelynx/issues', + source => 'https://github.com/derf/travelynx', + }, + secrets => [ '${cookie_secret}', ], diff --git a/bundles/travelynx/items.py b/bundles/travelynx/items.py index dda92cf..5463a1b 100644 --- a/bundles/travelynx/items.py +++ b/bundles/travelynx/items.py @@ -36,7 +36,7 @@ files = { }, '/opt/travelynx/travelynx.conf': { 'content_type': 'mako', - 'context': node.metadata['travelynx'], + 'context': node.metadata.get('travelynx'), 'needs': { 'git_deploy:/opt/travelynx', }, @@ -61,7 +61,7 @@ if isfile(join(repo.path, 'data', 'travelynx', 'files', 'imprint', node.name)): git_deploy = { '/opt/travelynx': { 'repo': 'https://github.com/derf/travelynx.git', - 'rev': node.metadata['travelynx']['version'], + 'rev': node.metadata.get('travelynx/version'), 'needs': { 'directory:/opt/travelynx', }, @@ -84,7 +84,7 @@ actions = { 'triggered': True, }, 'travelynx_database_migrate': { - 'command': 'cd /opt/travelynx && perl index.pl database migrate', + 'command': 'export PERL5LIB=/opt/travelynx/local/lib/perl5; cd /opt/travelynx && perl index.pl database migrate', # Because git_deploy does not put .git onto the server, the script # will complain on STDERR about not finding a git repository. # That's why we need to redirect stderr to /dev/null.