Skip to content

Commit

Permalink
Merge pull request #2719 from martonsz/service-paperless
Browse files Browse the repository at this point in the history
Adding service for paperless
  • Loading branch information
peaklabs-dev authored Oct 8, 2024
2 parents 1034d9c + ac887ee commit b8f211e
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
12 changes: 12 additions & 0 deletions public/svgs/paperless.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions templates/compose/paperless.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# documentation: https://docs.paperless-ngx.com/configuration/
# slogan: Paperless-ngx is a community-supported open-source document management system that transforms your physical documents into a searchable online archive so you can keep, well, less paper.
# logo: svgs/paperless.svg
# port: 8000
services:
redis:
image: docker.io/library/redis:${REDIS_TAG:-7.2.5}
restart: unless-stopped
volumes:
- redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
timeout: 10s
retries: 3

paperless:
image: paperlessngx/paperless-ngx:${PAPERLESS_TAG:-2.10.2}
restart: unless-stopped
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- data:/usr/src/paperless/data
- media:/usr/src/paperless/media
- type: bind
source: ./export
target: /usr/src/paperless/export
is_directory: true
- type: bind
source: ./consume
target: /usr/src/paperless/consume
is_directory: true
- type: bind
source: ./init-workaround.sh
target: /init-workaround.sh
content: |
#!/bin/bash
# Workaround for https://github.com/coollabsio/coolify/discussions/2572
# Paperless won't start if the PAPERLESS_URL ends with a path.
if [[ "$PAPERLESS_URL" == */ ]]; then
PAPERLESS_URL="${PAPERLESS_URL%/}"
export PAPERLESS_URL
fi
# Run the original entrypoint
# ENTRYPOINT CMD
exec /sbin/docker-entrypoint.sh /usr/local/bin/paperless_cmd.sh
entrypoint: ["/init-workaround.sh"]
environment:
- PAPERLESS_ADMIN_PASSWORD=$SERVICE_PASSWORD_PAPERLESS_ADMIN
- PAPERLESS_ADMIN_USER=${PAPERLESS_ADMIN_USER:-admin}
- PAPERLESS_REDIS=redis://redis:6379
- PAPERLESS_SECRET_KEY=$SERVICE_PASSWORD_64_PAPERLESSSECRETKEY
- PAPERLESS_URL=${PAPERLESS_URL:-$SERVICE_FQDN_PAPERLESS}
- SERVICE_FQDN_PAPERLESS

0 comments on commit b8f211e

Please sign in to comment.