diff --git a/bundles/infobeamer-cms/files/infobeamer-cms-runperiodic.service b/bundles/infobeamer-cms/files/infobeamer-cms-runperiodic.service index 8be500a..bf63eb1 100644 --- a/bundles/infobeamer-cms/files/infobeamer-cms-runperiodic.service +++ b/bundles/infobeamer-cms/files/infobeamer-cms-runperiodic.service @@ -4,7 +4,8 @@ After=network.target Requires=infobeamer-cms.service [Service] +Environment=SETTINGS=/opt/infobeamer-cms/settings.toml +WorkingDirectory=/opt/infobeamer-cms/src User=infobeamer-cms Group=infobeamer-cms -WorkingDirectory=/opt/infobeamer-cms -ExecStart=curl -s -H "Host: ${domain}" http://127.0.0.1:8000/sync +ExecStart=/opt/infobeamer-cms/venv/bin/python syncer.py diff --git a/bundles/infobeamer-cms/files/infobeamer-cms-runperiodic.timer b/bundles/infobeamer-cms/files/infobeamer-cms-runperiodic.timer index 48b52f4..049b063 100644 --- a/bundles/infobeamer-cms/files/infobeamer-cms-runperiodic.timer +++ b/bundles/infobeamer-cms/files/infobeamer-cms-runperiodic.timer @@ -2,7 +2,7 @@ Description=Run infobeamer-cms sync [Timer] -OnCalendar=*:0/5 +OnCalendar=minutely Persistent=true [Install] diff --git a/bundles/infobeamer-cms/metadata.py b/bundles/infobeamer-cms/metadata.py index 8d8703b..ab4685c 100644 --- a/bundles/infobeamer-cms/metadata.py +++ b/bundles/infobeamer-cms/metadata.py @@ -29,9 +29,6 @@ def nginx(metadata): '/': { 'target': 'http://127.0.0.1:8000', }, - '/sync': { - 'return': 403, - }, '/static': { 'alias': '/opt/infobeamer-cms/src/static', }, @@ -45,6 +42,7 @@ def nginx(metadata): @metadata_reactor.provides( + 'infobeamer-cms/config/DOMAIN', 'infobeamer-cms/config/TIME_MAX', 'infobeamer-cms/config/TIME_MIN', ) @@ -57,6 +55,7 @@ def event_times(metadata): return { 'infobeamer-cms': { 'config': { + 'DOMAIN': metadata.get('infobeamer-cms/domain'), 'TIME_MAX': int(event_end.timestamp()), 'TIME_MIN': int(event_start.timestamp()), },