This repository has been archived on 2023-02-05. You can view files and clone it, but cannot push or open issues or pull requests.
pyinfra-linkding/group_data/all.py

37 lines
1.1 KiB
Python
Raw Normal View History

2021-11-15 13:23:45 +00:00
app = {
'name': 'linkding',
'deps': ['skopeo', 'curl'],
'image': 'docker://sissbruecker/linkding:latest',
}
undocker = {
'url': 'https://git.sr.ht/~motiejus/undocker/refs/download/v1.0.2/undocker-linux-amd64-v1.0.2',
'sha256': 'b937e69e774c530c080c1f6685763ca7db4dc58520a5a2054d111e1504f47688',
'bin_path': '/usr/local/bin/undocker',
'app_dst': f"/opt/{app['name']}",
'cache': '/var/cache/undocker',
}
unix_account = {
'user': app['name'],
'group': app['name'],
'home': f"/home/{app['name']}",
'shell': '/bin/false',
}
data_directories = [
f"{unix_account['home']}/data"
]
systemd = {
'Description': app['name'],
'User': unix_account['user'],
'Group': unix_account['group'],
'EnvironmentFile': f"/etc/{app['name']}.env",
'WorkingDirectory': f"/etc/{app['name']}",
'RootDirectory': f"{undocker['app_dst']}",
'ReadWritePaths': '+/etc/linkding',
'BindPaths': f"{data_directories[0]}:/etc/linkding/data",
2021-11-15 13:31:54 +00:00
'BindReadOnlyPaths': '/etc/resolv.conf /etc/hosts /proc',
2021-11-15 13:23:45 +00:00
'ExecStart': '/etc/linkding/bootstrap.sh',
}