Commit graph

17 commits

Author SHA1 Message Date
208cecd5ef
paperless: Change script scan output dir
Still a HACK should not be hard-coded but perhaps installed as a
runnable script on localhost for the role (e.g. `scan-paperless`)
which receives its scanner more dynamically.
2025-10-20 23:53:58 +02:00
03316733f5
paperless: Fix compose missing quote 2025-07-21 22:19:59 +02:00
c96833988a
roles: Change main service name to app 2025-07-21 22:19:58 +02:00
4a5a0beca1
restic: Fix backup container conditionals
Change the inclusion of backup containers so they actually work. They
check that restic is enabled globally, and that restic is enabled for
the individual stack they belong to. If either of the conditions is not
met they do not deploy.

This way we can simply enable restic globally with `restic_enable` and
by default all stacks will be backed up. But if we want to exclude
specific stacks from backups we can do so with the individual
`<role>_restic_enable = False` variable.

Finally found a good version of doing so with the help of the following
medium article: https://medium.com/opsops/is-defined-in-ansible-d490945611ae
which basically makes use of default fallbacks instead.
2025-07-19 10:23:23 +02:00
84d7319465
roles: Set caddy and docker dependency chain
Each role (with outward-facing ingress needs) depends on caddy since
they depend on the availability of the 'caddy' network which is set in
that role.

Caddy in turn depends on docker.
2025-07-19 10:23:22 +02:00
6b26ba444b
restic: Only set backup hostname if we have ansible fact
For all backup containers.
2025-07-19 10:23:21 +02:00
9a8c4ae81f
repo: Rename compose templates to compose.yaml.jinja
It is a short, concicse name for the compose (and one of the ways that
docker officially recommends to name the files), and jinja is the
careful recommendation of the jinja docs.

https://jinja.palletsprojects.com/en/stable/templates/#template-file-extension
2025-07-18 21:49:32 +02:00
9cf2ee10a0
restic: Skip repo init on backup containers
Only the initial 'main' prune container will init the repository, the
others will not attempt even if they don't find a repository.
2025-07-18 21:49:30 +02:00
1fd72a05a6
restic: Fix backup container local repo mounting
If our chosen backup repo is a local one, each restic container needs to
mount the local path as a volume, otherwise the data is stuck in the
container itself.
2025-07-18 21:37:09 +02:00
cd842ea4b5
Add hostname to restic containers
Will pass through the hostname to any snapshots set up.
The hostname is _not_ derived from the random docker container string
but instead takes the name of the _host_ on which docker is running
(from ansible facts).

The hostname in combination with the tag should point to the correct
host -> stack which is being backed up.
2025-07-18 21:37:07 +02:00
b81328d400
paperless: Add restic backups 2025-07-18 21:37:06 +02:00
93876315ca
repo: Rename all yml extensions to yaml 2025-07-18 21:37:03 +02:00
2eab9d35d3
roles: Add inherited protocol for subdomains
Can be set globally ('protocol: http://') or per stack.
Defaults to empty which caddy treats as https.
2025-07-17 18:08:57 +02:00
e32f2366c8
roles: Make domain global variable
Each role has their own subdomains which can be set manually, or can
inherit from the global domain with a default prefix.
2025-07-17 18:08:54 +02:00
812deeb12d
roles: Inherit from global vars with defaults
Global options such as 'timezone' or 'puid' can be set on a host and all
(relevant) roles will inherit them. Will be used for more variables in
the future.
2025-07-17 18:08:53 +02:00
770da26b03
paperless: Improve documentation 2025-07-17 18:08:52 +02:00
6a1e01575c
repo: Move ansible setup to root dir 2025-07-17 18:07:52 +02:00