Compare commits

...

4 commits

Author SHA1 Message Date
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
c584f6e238
repo: Remove stacks directory 2025-07-18 21:49:31 +02:00
968d2f9ca9
caddy: Remove whoami test container 2025-07-18 21:49:31 +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
15 changed files with 9 additions and 256 deletions

View file

@ -30,7 +30,7 @@
community.docker.docker_compose_v2:
project_name: arrstack
# project_src: "{{ arrstack_env_dir }}"
definition: "{{ lookup('template', 'docker-compose.yaml.j2') | from_yaml }}"
definition: "{{ lookup('template', 'compose.yaml.jinja') | from_yaml }}"
remove_orphans: true
wait: true
wait_timeout: 60

View file

@ -296,6 +296,7 @@ services:
hostname: "{{ ansible_hostname }}"
environment:
TZ: "{{ restic_tz }}"
SKIP_INIT: true
BACKUP_CRON: "{{ arrstack_restic_cron }}"
RESTIC_REPOSITORY: "{{ restic_repo }}"
RESTIC_PASSWORD: "{{ restic_pass }}"

View file

@ -5,7 +5,7 @@
- name: Start the compose stack
community.docker.docker_compose_v2:
project_name: caddy
definition: "{{ lookup('template', 'docker-compose.yaml.j2') | from_yaml }}"
definition: "{{ lookup('template', 'compose.yaml.jinja') | from_yaml }}"
remove_orphans: true
wait: true
wait_timeout: 60

View file

@ -12,15 +12,6 @@ services:
labels:
caddy.auto_https: "off"
whoami:
container_name: whoami
image: traefik/whoami
networks:
- caddy
labels:
caddy: "http://test.pichi.berlin"
caddy.reverse_proxy: "{{ '{{' }}upstreams 80{{ '}}'}}" # has to be done to prevent ansible templating
networks:
caddy:
external: true

View file

@ -10,7 +10,7 @@
- name: Start the compose stack
community.docker.docker_compose_v2:
project_name: stack_grocy
definition: "{{ lookup('template', 'docker-compose.yaml.j2') | from_yaml }}"
definition: "{{ lookup('template', 'compose.yaml.jinja') | from_yaml }}"
remove_orphans: true
wait: true
wait_timeout: 60

View file

@ -22,6 +22,7 @@ services:
hostname: "{{ ansible_hostname }}"
environment:
TZ: "{{ restic_tz }}"
SKIP_INIT: true
BACKUP_CRON: "{{ stack_grocy_restic_cron }}"
RESTIC_REPOSITORY: "{{ restic_repo }}"
RESTIC_PASSWORD: "{{ restic_pass }}"

View file

@ -23,7 +23,7 @@
- name: Start compose stack
community.docker.docker_compose_v2:
project_name: paperless
definition: "{{ lookup('template', 'docker-compose.yaml.j2') | from_yaml }}"
definition: "{{ lookup('template', 'compose.yaml.jinja') | from_yaml }}"
remove_orphans: true
wait: true
wait_timeout: 60

View file

@ -72,6 +72,7 @@ services:
environment:
TZ: "{{ restic_tz }}"
BACKUP_CRON: "{{ stack_paperless_restic_cron }}"
SKIP_INIT: true
RESTIC_REPOSITORY: "{{ restic_repo }}"
RESTIC_PASSWORD: "{{ restic_pass }}"
AWS_ACCESS_KEY_ID: "{{ restic_s3_key }}"

View file

@ -11,7 +11,7 @@
- name: Deploy restic to compose
community.docker.docker_compose_v2:
project_name: restic
definition: "{{ lookup('template', 'docker-compose.yaml.j2') | from_yaml }}"
definition: "{{ lookup('template', 'compose.yaml.jinja') | from_yaml }}"
remove_orphans: true
wait: true
wait_timeout: 60

View file

@ -3,6 +3,6 @@ stack_name: restic
stack_image: "mazzolino/restic"
stack_compose: "{{ lookup('template', 'docker-stack.yml.j2') | from_yaml }}"
stack_compose: "{{ lookup('template', 'compose.yaml.jinja') | from_yaml }}"
backup_enable: true

View file

@ -1,28 +0,0 @@
version: '2'
services:
influxdb:
image: influxdb:1.8.10-alpine
ports:
- '8086:8086'
volumes:
- influxdb-storage:/var/lib/influxdb
environment:
- INFLUXDB_DB=db0
- INFLUXDB_ADMIN_USER=${INFLUXDB_USERNAME}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_PASSWORD}
grafana:
image: grafana/grafana:latest
ports:
- '3000:3000'
volumes:
- grafana-storage:/var/lib/grafana
- ./grafana-provisioning/:/etc/grafana/provisioning
depends_on:
- influxdb
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
volumes:
influxdb-storage:
chronograf-storage:
grafana-storage:

View file

@ -1,42 +0,0 @@
# The UID and GID of the user used to run paperless in the container. Set this
# to your UID and GID on the host so that you have write access to the
# consumption directory.
#USERMAP_UID=1000
#USERMAP_GID=1000
# Additional languages to install for text recognition, separated by a
# whitespace. Note that this is
# different from PAPERLESS_OCR_LANGUAGE (default=eng), which defines the
# language used for OCR.
# The container installs English, German, Italian, Spanish and French by
# default.
# See https://packages.debian.org/search?keywords=tesseract-ocr-&searchon=names&suite=buster
# for available languages.
#PAPERLESS_OCR_LANGUAGES=tur ces
###############################################################################
# Paperless-specific settings #
###############################################################################
# All settings defined in the paperless.conf.example can be used here. The
# Docker setup does not use the configuration file.
# A few commonly adjusted settings are provided below.
# This is required if you will be exposing Paperless-ngx on a public domain
# (if doing so please consider security measures such as reverse proxy)
#PAPERLESS_URL=https://paperless.example.com
# Adjust this key if you plan to make paperless available publicly. It should
# be a very long sequence of random characters. You don't need to remember it.
#PAPERLESS_SECRET_KEY=change-me
# Use this variable to set a timezone for the Paperless Docker containers. If not specified, defaults to UTC.
#PAPERLESS_TIME_ZONE=America/Los_Angeles
# The default language to use for OCR. Set this to the language most of your
# documents are written in.
#PAPERLESS_OCR_LANGUAGE=eng
# Set if accessing paperless via a domain subpath e.g. https://domain.com/PATHPREFIX and using a reverse-proxy like traefik or nginx
#PAPERLESS_FORCE_SCRIPT_NAME=/PATHPREFIX
#PAPERLESS_STATIC_URL=/PATHPREFIX/static/ # trailing slash required

View file

@ -1,55 +0,0 @@
# Docker Compose file for running paperless from the Docker Hub.
# This file contains everything paperless needs to run.
# Paperless supports amd64, arm and arm64 hardware.
#
# All compose files of paperless configure paperless in the following way:
#
# - Paperless is (re)started on system boot, if it was running before shutdown.
# - Docker volumes for storing data are managed by Docker.
# - Folders for importing and exporting files are created in the same directory
# as this file and mounted to the correct folders inside the container.
# - Paperless listens on port 8000.
#
# SQLite is used as the database. The SQLite file is stored in the data volume.
#
# To install and update paperless with this file, do the following:
#
# - Copy this file as 'docker-compose.yml' and the files 'docker-compose.env'
# and '.env' into a folder.
# - Run 'docker compose pull'.
# - Run 'docker compose run --rm webserver createsuperuser' to create a user.
# - Run 'docker compose up -d'.
#
# For more extensive installation and update instructions, refer to the
# documentation.
services:
broker:
image: docker.io/library/redis:7
restart: unless-stopped
volumes:
- redisdata:/data
webserver:
image: ghcr.io/paperless-ngx/paperless-ngx:latest
restart: unless-stopped
depends_on:
- broker
ports:
- "8000:8000"
volumes:
- /home/marty/documents/archive/data:/usr/src/paperless/data
- /home/marty/documents/archive/media:/usr/src/paperless/media
- /home/marty/documents/archive/export:/usr/src/paperless/export
- /home/marty/documents/archive/consume:/usr/src/paperless/consume
env_file: docker-compose.env
environment:
- "PAPERLESS_REDIS=redis://broker:6379"
- "PAPERLESS_OCR_LANGUAGES=eng deu frk" # ALL ocr languages to install
- "PAPERLESS_OCR_LANGUAGE=deu" # the default ocr language
- "PAPERLESS_TIME_ZONE=Europe/Berlin"
volumes:
data:
media:
redisdata:

View file

@ -1,116 +0,0 @@
# Docker Compose file for running paperless from the Docker Hub.
# This file contains everything paperless needs to run.
# Paperless supports amd64, arm and arm64 hardware.
#
# All compose files of paperless configure paperless in the following way:
#
# - Paperless is (re)started on system boot, if it was running before shutdown.
# - Docker volumes for storing data are managed by Docker.
# - Folders for importing and exporting files are created in the same directory
# as this file and mounted to the correct folders inside the container.
# - Paperless listens on port 8000.
#
# SQLite is used as the database. The SQLite file is stored in the data volume.
#
# To install and update paperless with this file, do the following:
#
# - Copy this file as 'docker-compose.yml' and the files 'docker-compose.env'
# and '.env' into a folder.
# - Run 'docker compose pull'.
# - Run 'docker compose run --rm webserver createsuperuser' to create a user.
# - use anything (secure) for username:pw
# - Run 'docker compose up -d'.
#
# For more extensive installation and update instructions, refer to the
# documentation.
services:
paperless:
container_name: paperless
image: ghcr.io/paperless-ngx/paperless-ngx:latest
restart: unless-stopped
networks:
- frontend
- backend
ports:
- 8000:8000
env_file: docker-compose.env
security_opt:
- no-new-privileges:true
depends_on:
- paperless-redis
- paperless-postgres
volumes:
- data:/usr/src/paperless/data # container data
- /home/marty/documents/archive/.media:/usr/src/paperless/media # document location
- export:/usr/src/paperless/export # backup location
- /home/marty/documents/archive/consume:/usr/src/paperless/consume # watch folder
environment:
# - "PAPERLESS_TIME_ZONE=$TZ"
- "PAPERLESS_TIME_ZONE=Europe/Berlin"
- "PAPERLESS_OCR_LANGUAGE=deu+eng" # the default ocr language
- "PAPERLESS_OCR_LANGUAGES=eng deu frk" # ALL ocr languages to install
- "PAPERLESS_OCR_SKIP_ARCHIVE_FILE=with_text"
- "PAPERLESS_ENABLE_UPDATE_CHECK=true"
- "PAPERLESS_REDIS=redis://paperless-redis:6379"
- "PAPERLESS_DBHOST=paperless-postgres"
- "PAPERLESS_DBNAME=paperlessdb"
- "PAPERLESS_DBUSER=paperlessdbuser"
- "PAPERLESS_DBPASS=paperlessdbpassword"
- "PAPERLESS_SECRET_KEY=Mysupersecretpaperless(ngx)key"
- "PAPERLESS_FILENAME_FORMAT={{created_year}}/{{correspondent}}/{{created}}_{{title}}"
# Set the following two for your first launch
# and change the admin password afterwards.
# Once setup, you can safely remove these variables.
- "PAPERLESS_ADMIN_USER=ADMINUSERNAME"
- "PAPERLESS_ADMIN_PASSWORD=ADMINPASSWORD"
paperless-postgres:
container_name: paperless-postgres
image: postgres:16.0-alpine #fixedVersion
restart: unless-stopped
networks:
- backend
security_opt:
- no-new-privileges:true
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: paperlessdbuser
POSTGRES_DB: paperlessdb
POSTGRES_PASSWORD: paperlessdbpassword
paperless-redis:
container_name: paperless-redis
image: redis:7.2-alpine #fixedVersion
restart: unless-stopped
networks:
- backend
security_opt:
- no-new-privileges:true
volumes:
- redis-data:/data
environment:
REDIS_ARGS: "--save 60 10"
volumes:
data:
export:
#media:
postgres-data:
redis-data:
networks:
frontend:
name: frontend
driver: bridge
backend:
name: backend
driver: bridge
# secrets:
# paperless_db_paperless_passwd:
# file: ./secrets/paperless_db_paperless_passwd
# paperless_secret_key:
# file: ./secrets/paperless_secret_key
#