[Unit] Description=Atlas Paperless-ngx Requires=atlas-paperless-db.service atlas-paperless-valkey.service atlas-paperless-tika.service atlas-paperless-gotenberg.service atlas-paperless-ollama.service After=atlas-paperless-db.service atlas-paperless-valkey.service atlas-paperless-tika.service atlas-paperless-gotenberg.service atlas-paperless-ollama.service RequiresMountsFor={{ atlas_paperless_root }}/data {{ atlas_paperless_root }}/media {{ atlas_paperless_root }}/consume [Container] ContainerName=atlas-paperless Image={{ atlas_paperless_image }} UserNS=keep-id:uid={{ atlas_admin_uid }},gid={{ atlas_admin_gid }} Network=atlas-paperless.network PublishPort={{ ansible_host }}:{{ atlas_paperless_http_port }}:8000 Environment=USERMAP_UID={{ atlas_admin_uid }} Environment=USERMAP_GID={{ atlas_admin_gid }} Environment=PAPERLESS_REDIS=redis://atlas-paperless-valkey:6379 Environment=PAPERLESS_DBENGINE=postgresql Environment=PAPERLESS_DBHOST=atlas-paperless-db Environment=PAPERLESS_DBNAME=paperless Environment=PAPERLESS_DBUSER=paperless Environment=PAPERLESS_DBPASS_FILE=/run/secrets/postgres-password Environment=PAPERLESS_SECRET_KEY_FILE=/run/secrets/secret-key Environment=PAPERLESS_URL=https://{{ atlas_paperless_domain }} Environment=PAPERLESS_TIME_ZONE={{ atlas_timezone }} Environment=PAPERLESS_OCR_LANGUAGE={{ atlas_paperless_ocr_language }} Environment=PAPERLESS_CONSUMPTION_DIR=/usr/src/paperless/consume Environment=PAPERLESS_DATA_DIR=/usr/src/paperless/data Environment=PAPERLESS_MEDIA_ROOT=/usr/src/paperless/media Environment=PAPERLESS_TIKA_ENABLED=1 Environment=PAPERLESS_TIKA_ENDPOINT=http://atlas-paperless-tika:9998 Environment=PAPERLESS_TIKA_GOTENBERG_ENDPOINT=http://atlas-paperless-gotenberg:3000 Environment=PAPERLESS_AI_ENABLED=true Environment=PAPERLESS_AI_LLM_BACKEND=ollama Environment=PAPERLESS_AI_LLM_ENDPOINT=http://atlas-paperless-ollama:11434 Environment=PAPERLESS_AI_LLM_MODEL={{ atlas_paperless_llm_model }} Environment=PAPERLESS_AI_LLM_EMBEDDING_BACKEND=ollama Environment=PAPERLESS_AI_LLM_EMBEDDING_MODEL={{ atlas_paperless_embedding_model }} Environment=PAPERLESS_AI_LLM_CONTEXT_SIZE=2048 Environment=PAPERLESS_AI_LLM_REQUEST_TIMEOUT=300 Volume={{ atlas_paperless_root }}/data:/usr/src/paperless/data:Z Volume={{ atlas_paperless_root }}/media:/usr/src/paperless/media:Z Volume={{ atlas_paperless_root }}/consume:/usr/src/paperless/consume:Z Volume={{ atlas_paperless_private_dir }}/postgres-password:/run/secrets/postgres-password:ro,z Volume={{ atlas_paperless_private_dir }}/secret-key:/run/secrets/secret-key:ro,z PodmanArgs=--memory=2g NoNewPrivileges=true DropCapability=all [Service] Restart=on-failure RestartSec=10 TimeoutStartSec=900 [Install] WantedBy=default.target