initial commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
# lives at ~/.config/systemd/user/libguides-notifier.service
|
||||||
|
|
||||||
|
# User-level systemd service to run main.py
|
||||||
|
# Uses a wrapper script so the working directory and .env are found correctly.
|
||||||
|
# Configuration is via ~/.config/libguides-notifier.env, no in-file path edits needed.
|
||||||
|
# Create that file with one line:
|
||||||
|
# REPO_PATH=/absolute/path/to/this/repo
|
||||||
|
# Then run:
|
||||||
|
# systemctl --user daemon-reload
|
||||||
|
[Unit]
|
||||||
|
Description=Run main.py (LibGuides notifier)
|
||||||
|
Wants=network-online.target NetworkManager-wait-online.service
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
EnvironmentFile=%h/.config/libguides-notifier.env
|
||||||
|
ExecStart=/bin/bash -lc '${REPO_PATH}/scripts/run_main.sh'
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# lives at ~/.config/systemd/user/libguides-notifier.timer
|
||||||
|
|
||||||
|
# User-level systemd timer that "catches up" missed runs if the machine was off.
|
||||||
|
[Unit]
|
||||||
|
Description=Schedule main.py with catch-up if missed
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
# Change this to your desired schedule; examples:
|
||||||
|
# OnCalendar=daily
|
||||||
|
# OnCalendar=Mon..Fri 09:00
|
||||||
|
# See man systemd.time for syntax.
|
||||||
|
OnCalendar=*-*-03,18 09:00:00
|
||||||
|
Timezone=America/New_York
|
||||||
|
Persistent=true
|
||||||
|
AccuracySec=1m
|
||||||
|
RandomizedDelaySec=5m
|
||||||
|
Unit=libguides-notifier.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
// lives at /etc/renovate/config.js
|
||||||
|
// token goes in the same directory
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
platform: 'gitea',
|
||||||
|
endpoint: 'https://tildegit.org/api/v1/',
|
||||||
|
token: process.env.RENOVATE_TOKEN,
|
||||||
|
// repositories: ['MarkEEaton/teams-bot'],
|
||||||
|
// Or use autodiscover to find all repos
|
||||||
|
autodiscover: true,
|
||||||
|
|
||||||
|
enabledManagers: ['npm', 'nodenv', 'pip_requirements', 'pip_setup', 'poetry', 'pipenv', 'pep621'],
|
||||||
|
// Disable GitHub-specific features
|
||||||
|
fetchReleaseNotes: false,
|
||||||
|
githubTokenWarn: false,
|
||||||
|
|
||||||
|
// Only use npm registry, PyPI, etc. - don't query GitHub
|
||||||
|
hostRules: [
|
||||||
|
{
|
||||||
|
hostType: 'github',
|
||||||
|
enabled: false,
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
// this is so that renovate doesn't think that python-version is a dependency
|
||||||
|
packageRules: [
|
||||||
|
{
|
||||||
|
// Ignore Python version updates
|
||||||
|
matchDatasources: ['python-version'],
|
||||||
|
enabled: false,
|
||||||
|
}
|
||||||
|
],
|
||||||
|
};
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# lives at /etc/systemd/system/renovate.service
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Renovate Bot
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
User=renovate
|
||||||
|
Group=renovate
|
||||||
|
WorkingDirectory=/var/lib/renovate
|
||||||
|
# /snap/bin is included first in the PATH because I needed a more up to
|
||||||
|
# date node.js than the system had, so I installed the newer version via
|
||||||
|
# snap. This path points to that first.
|
||||||
|
Environment="PATH=/snap/bin:/usr/local/bin:/usr/bin:/bin"
|
||||||
|
# load the token from the environment
|
||||||
|
EnvironmentFile=/etc/renovate/token-env
|
||||||
|
Environment="RENOVATE_CONFIG_FILE=/etc/renovate/config.js"
|
||||||
|
Environment="GIT_AUTHOR_NAME=Renovate Bot"
|
||||||
|
Environment="GIT_AUTHOR_EMAIL=b7jl@sdf.org"
|
||||||
|
Environment="GIT_COMMITTER_NAME=Renovate Bot"
|
||||||
|
Environment="GIT_COMMITTER_EMAIL=b7jl@sdf.org"
|
||||||
|
# use the snap version of npx
|
||||||
|
ExecStart=/snap/bin/npx renovate
|
||||||
|
# Logging
|
||||||
|
StandardOutput=journal
|
||||||
|
StandardError=journal
|
||||||
|
SyslogIdentifier=renovate
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# lives at /etc/systemd/system/renovate.timer
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Run Renovate Bot periodically
|
||||||
|
Requires=renovate.service
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
# Run every 6 hours
|
||||||
|
OnCalendar=00/6:00:00
|
||||||
|
# Run 5 minutes after boot if we missed a scheduled run
|
||||||
|
OnBootSec=5min
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
Reference in New Issue
Block a user