diff --git a/roles/arr/tasks/main.yaml b/roles/arr/tasks/main.yaml index aa68074..47e6a03 100644 --- a/roles/arr/tasks/main.yaml +++ b/roles/arr/tasks/main.yaml @@ -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 diff --git a/roles/arr/templates/docker-compose.yaml.j2 b/roles/arr/templates/compose.yaml.jinja similarity index 99% rename from roles/arr/templates/docker-compose.yaml.j2 rename to roles/arr/templates/compose.yaml.jinja index df1d527..802e992 100644 --- a/roles/arr/templates/docker-compose.yaml.j2 +++ b/roles/arr/templates/compose.yaml.jinja @@ -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 }}" diff --git a/roles/caddy/tasks/main.yaml b/roles/caddy/tasks/main.yaml index 61c1206..3889e2a 100644 --- a/roles/caddy/tasks/main.yaml +++ b/roles/caddy/tasks/main.yaml @@ -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 diff --git a/roles/caddy/templates/docker-compose.yaml.j2 b/roles/caddy/templates/compose.yaml.jinja similarity index 57% rename from roles/caddy/templates/docker-compose.yaml.j2 rename to roles/caddy/templates/compose.yaml.jinja index 9f47f5a..10ca38b 100644 --- a/roles/caddy/templates/docker-compose.yaml.j2 +++ b/roles/caddy/templates/compose.yaml.jinja @@ -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 diff --git a/roles/grocy/tasks/main.yaml b/roles/grocy/tasks/main.yaml index 4bc182e..66c6dbb 100644 --- a/roles/grocy/tasks/main.yaml +++ b/roles/grocy/tasks/main.yaml @@ -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 diff --git a/roles/grocy/templates/docker-compose.yaml.j2 b/roles/grocy/templates/compose.yaml.jinja similarity index 98% rename from roles/grocy/templates/docker-compose.yaml.j2 rename to roles/grocy/templates/compose.yaml.jinja index 66012f7..e09a343 100644 --- a/roles/grocy/templates/docker-compose.yaml.j2 +++ b/roles/grocy/templates/compose.yaml.jinja @@ -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 }}" diff --git a/roles/paperless/tasks/main.yaml b/roles/paperless/tasks/main.yaml index efa1232..351ea68 100644 --- a/roles/paperless/tasks/main.yaml +++ b/roles/paperless/tasks/main.yaml @@ -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 diff --git a/roles/paperless/templates/docker-compose.yaml.j2 b/roles/paperless/templates/compose.yaml.jinja similarity index 99% rename from roles/paperless/templates/docker-compose.yaml.j2 rename to roles/paperless/templates/compose.yaml.jinja index 170dd7e..c698b92 100644 --- a/roles/paperless/templates/docker-compose.yaml.j2 +++ b/roles/paperless/templates/compose.yaml.jinja @@ -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 }}" diff --git a/roles/restic/tasks/main.yaml b/roles/restic/tasks/main.yaml index e87fdf1..04bb51f 100644 --- a/roles/restic/tasks/main.yaml +++ b/roles/restic/tasks/main.yaml @@ -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 diff --git a/roles/restic/templates/docker-compose.yaml.j2 b/roles/restic/templates/compose.yaml.jinja similarity index 100% rename from roles/restic/templates/docker-compose.yaml.j2 rename to roles/restic/templates/compose.yaml.jinja diff --git a/roles/restic/vars/main.yaml b/roles/restic/vars/main.yaml index 8b3dcf5..0ecc829 100644 --- a/roles/restic/vars/main.yaml +++ b/roles/restic/vars/main.yaml @@ -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 diff --git a/stacks/monitoring.yaml b/stacks/monitoring.yaml deleted file mode 100644 index 9168f07..0000000 --- a/stacks/monitoring.yaml +++ /dev/null @@ -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: diff --git a/stacks/paperless/docker-compose.env b/stacks/paperless/docker-compose.env deleted file mode 100644 index c4dbb4c..0000000 --- a/stacks/paperless/docker-compose.env +++ /dev/null @@ -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 diff --git a/stacks/paperless/docker-compose.simple_example.yaml b/stacks/paperless/docker-compose.simple_example.yaml deleted file mode 100644 index 6b16b8b..0000000 --- a/stacks/paperless/docker-compose.simple_example.yaml +++ /dev/null @@ -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: diff --git a/stacks/paperless/docker-compose.yaml b/stacks/paperless/docker-compose.yaml deleted file mode 100644 index 65e3aef..0000000 --- a/stacks/paperless/docker-compose.yaml +++ /dev/null @@ -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 -#