You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.2 KiB

10 months ago
- name: Set up Paperless-ngx
hosts: lotus-land-story
vars_files:
- vars.yml
vars:
8 months ago
version: 2.6.3
10 months ago
tasks:
- name: Create directories for volume mounting
ansible.builtin.file:
path: /mnt/lotus-land-story/paperless-ngx/{{ item }}
10 months ago
state: directory
mode: "0700"
loop:
- consume
- data
- export
- media
10 months ago
- name: Celery monitoring configuration
ansible.builtin.copy:
content: |
url_prefix = "/flower/"
dest: /mnt/lotus-land-story/paperless-ngx/flowerconfig.py
10 months ago
mode: "0644"
10 months ago
- name: Get docker network
community.docker.docker_network:
name: lotus_land_story
register: docker_network
# https://github.com/paperless-ngx/paperless-ngx/blob/main/docker/compose/docker-compose.sqlite.yml
- name: Run Paperless-ngx
community.docker.docker_container:
restart: true
name: paperless-ngx
10 months ago
image: ghcr.io/paperless-ngx/paperless-ngx:{{ version }}
env:
10 months ago
PAPERLESS_ENABLE_FLOWER: "true"
10 months ago
PAPERLESS_ENABLE_HTTP_REMOTE_USER: "true"
PAPERLESS_OCR_USER_ARGS: '{"continue_on_soft_render_error": true}'
10 months ago
PAPERLESS_REDIS: redis://host.docker.internal:6379
PAPERLESS_TASK_WORKERS: "1"
PAPERLESS_THREADS_PER_WORKER: "1"
10 months ago
PAPERLESS_TIME_ZONE: America/Los_Angeles
8 months ago
PAPERLESS_URL: https://docs.kejadlen.dev
PAPERLESS_WEBSERVER_WORKERS: "1"
10 months ago
volumes:
- /mnt/lotus-land-story/paperless-ngx/data:/usr/src/paperless/data
- /mnt/lotus-land-story/paperless-ngx/media:/usr/src/paperless/media
- /mnt/lotus-land-story/paperless-ngx/export:/usr/src/paperless/export
- /mnt/lotus-land-story/paperless-ngx/consume:/usr/src/paperless/consume
- /mnt/lotus-land-story/paperless-ngx/flowerconfig.py:/usr/src/paperless/src/paperless/flowerconfig.py:ro
10 months ago
restart_policy: unless-stopped
networks:
- name: lotus_land_story
etc_hosts:
host.docker.internal: host-gateway
10 months ago
10 months ago
handlers:
- name: Import restarts
ansible.builtin.import_tasks: restarts.yml
# vim: ft=yaml.ansible