mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-13 03:58:47 +00:00
64 lines
2.2 KiB
YAML
64 lines
2.2 KiB
YAML
---
|
|
- name: Create paperless_ng directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
with_items:
|
|
- "{{ paperless_ng_config_directory }}"
|
|
- "{{ paperless_ng_files_directory }}"
|
|
- "{{ paperless_ng_postgres_directory }}"
|
|
- "{{ paperless_ng_data_directory }}"
|
|
- "{{ paperless_ng_export_directory }}"
|
|
- "{{ paperless_ng_media_directory }}"
|
|
- "{{ paperless_ng_consume_directory }}"
|
|
|
|
|
|
- name: Create paperless_ng network
|
|
docker_network:
|
|
name: "{{ paperless_ng_container_network_name }}"
|
|
|
|
- name: paperless_ng redis broker
|
|
docker_container:
|
|
name: "{{ paperless_ng_container_name_redis }}"
|
|
image: redis:6.0
|
|
pull: true
|
|
restart_policy: unless-stopped
|
|
networks:
|
|
- name: "{{ paperless_ng_container_network_name }}"
|
|
|
|
- name: paperless_ng postgres Docker Container
|
|
docker_container:
|
|
name: "{{ paperless_container_name_postgres }}"
|
|
image: postgres:13
|
|
pull: true
|
|
volumes:
|
|
- "{{ paperless_ng_postgres_directory }}:/var/lib/postgresql/data"
|
|
env:
|
|
POSTGRES_DB: "{{ paperless_ng_postgres_db }}"
|
|
POSTGRES_USER: "{{ paperless_ng_postgres_user }}"
|
|
POSTGRES_PASSWORD: "{{ paperless_ng_postgres_password }}"
|
|
restart_policy: unless-stopped
|
|
networks:
|
|
- name: "{{ paperless_ng_container_network_name }}"
|
|
|
|
- name: paperless_ng UI Docker Container
|
|
docker_container:
|
|
name: "{{ paperless_container_name_uiserver }}"
|
|
image: jonaswinkler/paperless-ng:latest
|
|
pull: true
|
|
volumes:
|
|
- "{{ paperless_ng_data_directory }}:/usr/src/paperless/data"
|
|
- "{{ paperless_ng_media_directory }}:/usr/src/paperless/media"
|
|
- "{{ paperless_ng_export_directory }}:/usr/src/paperless/export"
|
|
- "{{ paperless_ng_consume_directory }}:/usr/src/paperless/consume"
|
|
ports:
|
|
- "{{ paperless_port }}:8000"
|
|
env:
|
|
PAPERLESS_REDIS: "redis://{{ paperless_ng_container_name_redis | string }}:6379"
|
|
PAPERLESS_DBHOST: "{{ paperless_ng_container_name_postgres | string }}"
|
|
USERMAP_UID: "{{ paperless_ng_user_id }}"
|
|
USERMAP_GID: "{{ paperless_ng_group_id }}"
|
|
PAPERLESS_OCR_LANGUAGES: "{{ paperless_ng_languages }}"
|
|
restart_policy: unless-stopped
|
|
networks:
|
|
- name: "{{ paperless_ng_container_network_name }}"
|