Initial commit of Docker files
This commit is contained in:
150
compose/document-management.yml
Executable file
150
compose/document-management.yml
Executable file
@@ -0,0 +1,150 @@
|
||||
# Document Management Stack - Paperless NGX
|
||||
services:
|
||||
# ===== PAPERLESS INFRASTRUCTURE =====
|
||||
paperless-broker:
|
||||
container_name: paperless-broker
|
||||
image: redis:8-alpine
|
||||
profiles: ["documents", "all"]
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redisdata:/data
|
||||
networks:
|
||||
- database_network
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
|
||||
# ===== DOCUMENT PROCESSING SERVICES =====
|
||||
paperless-gotenberg:
|
||||
container_name: paperless-gotenberg
|
||||
image: gotenberg/gotenberg:8.20
|
||||
profiles: ["documents", "all"]
|
||||
restart: unless-stopped
|
||||
command:
|
||||
- "gotenberg"
|
||||
- "--chromium-disable-javascript=true"
|
||||
- "--chromium-allow-list=file:///tmp/.*"
|
||||
networks:
|
||||
- database_network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
paperless-tika:
|
||||
container_name: paperless-tika
|
||||
image: apache/tika:latest
|
||||
profiles: ["documents", "all"]
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- database_network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9998/version"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
# ===== MAIN PAPERLESS APPLICATION =====
|
||||
paperless-webserver:
|
||||
container_name: paperless-webserver
|
||||
image: ghcr.io/paperless-ngx/paperless-ngx:latest
|
||||
profiles: ["documents", "all"]
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
paperless-db:
|
||||
condition: service_healthy
|
||||
paperless-broker:
|
||||
condition: service_started
|
||||
paperless-gotenberg:
|
||||
condition: service_started
|
||||
paperless-tika:
|
||||
condition: service_started
|
||||
ports:
|
||||
- "8100:8000"
|
||||
volumes:
|
||||
- ./paperless/data:/usr/src/paperless/data
|
||||
- ./paperless/media:/usr/src/paperless/media
|
||||
- ./paperless/export:/usr/src/paperless/export
|
||||
- ./paperless/consume:/usr/src/paperless/consume
|
||||
env_file: ./paperless/docker-compose.env
|
||||
environment:
|
||||
- PAPERLESS_REDIS=redis://paperless-broker:6379
|
||||
- PAPERLESS_DBENGINE=mariadb
|
||||
- PAPERLESS_DBHOST=paperless-db
|
||||
- PAPERLESS_DBUSER=${PAPERLESS_DB_USER}
|
||||
- PAPERLESS_DBPASS=${PAPERLESS_DB_PASSWORD}
|
||||
- PAPERLESS_DBPORT=3306
|
||||
- PAPERLESS_URL=${PAPERLESS_URL}
|
||||
- PAPERLESS_TIKA_ENABLED=1
|
||||
- PAPERLESS_TIKA_GOTENBERG_ENDPOINT=http://paperless-gotenberg:3000
|
||||
- PAPERLESS_TIKA_ENDPOINT=http://paperless-tika:9998
|
||||
networks:
|
||||
- database_network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
# ===== AI ENHANCEMENT =====
|
||||
paperless-ai:
|
||||
image: clusterzx/paperless-ai:latest
|
||||
container_name: paperless-ai
|
||||
profiles: ["documents", "all"]
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- paperless-webserver
|
||||
cap_drop:
|
||||
- ALL
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${PGID}
|
||||
- RAG_SERVICE_URL=http://localhost:8000
|
||||
- RAG_SERVICE_ENABLED=true
|
||||
ports:
|
||||
- "3040:3000"
|
||||
volumes:
|
||||
- aidata:/app/data
|
||||
|
||||
networks:
|
||||
database_network:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
redisdata:
|
||||
external: true
|
||||
dbdata:
|
||||
external: true
|
||||
aidata:
|
||||
external: true
|
||||
|
||||
paperless-db:
|
||||
container_name: paperless-db
|
||||
image: mariadb:11
|
||||
profiles: ["documents", "all"]
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- dbdata:/var/lib/mysql
|
||||
environment:
|
||||
- MARIADB_HOST=paperless
|
||||
- MARIADB_DATABASE=${PAPERLESS_DB_NAME}
|
||||
- MARIADB_USER=${PAPERLESS_DB_USER}
|
||||
- MARIADB_PASSWORD=${PAPERLESS_DB_PASSWORD}
|
||||
- MARIADB_ROOT_PASSWORD=${PAPERLESS_DB_ROOT_PASSWORD}
|
||||
networks:
|
||||
- database_network
|
||||
healthcheck:
|
||||
test: ["CMD", "mariadb-admin", "ping", "-h", "localhost", "-u", "root", "-p$$MARIADB_ROOT_PASSWORD"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
start_period: 30s
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
Reference in New Issue
Block a user