Restructure files

This commit is contained in:
Sonny Bakker 2021-05-29 20:23:49 +02:00
parent 3918c63751
commit c9ffc8393d
16 changed files with 93 additions and 122 deletions

3
templates/env.j2 Normal file
View file

@ -0,0 +1,3 @@
DOMAINS="{{ app_domains | join(':') }}"
TOKEN="{{ app_token }}"
SENTRY_DSN="{{ sentry_dsn }}"

14
templates/service.j2 Normal file
View file

@ -0,0 +1,14 @@
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
#
[Unit]
Description=Transip-client service
[Service]
EnvironmentFile={{ app_dir }}/.env
WorkingDirectory={{ app_dir }}
ExecStart=poetry run listen
Type=oneshot
[Install]
WantedBy=default.target

13
templates/timer.j2 Normal file
View file

@ -0,0 +1,13 @@
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
#
[Unit]
Description=Trans IP client timer
[Timer]
OnCalendar=+5min
Unit=transip-client.service
Persistent=true
[Install]
WantedBy=timers.target