mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-22 00:52:42 -05:00

* chore(devcontainer): drop read-only host .gitconfig bind mount The bind mount prevented adjusting git config inside the dev container, and VS Code Dev Containers already copies the host .gitconfig automatically, making the mount unnecessary. This restores ability to manage git settings within the container. * chore(gitignore): ignore .pnpm-store folder for pnpm package management Add .pnpm-store/ to .gitignore to prevent local pnpm package store from being tracked by git when using the devcontainer. * docs(development): clarify VS Code devcontainer setup steps for Windows Add instructions, how to overcome some issues caused by using Windows as host system.
78 lines
3.4 KiB
YAML
78 lines
3.4 KiB
YAML
# Docker Compose file for developing Paperless NGX in VSCode DevContainers.
|
|
# This file contains everything Paperless NGX needs to run.
|
|
# Paperless supports amd64, arm, and arm64 hardware.
|
|
# All compose files of Paperless configure it in the following way:
|
|
#
|
|
# - Paperless is (re)started on system boot if it was running before shutdown.
|
|
# - Docker volumes for storing data are managed by Docker.
|
|
# - Folders for importing and exporting files are created in the same directory
|
|
# as this file and mounted to the correct folders inside the container.
|
|
# - Paperless listens on port 8000.
|
|
#
|
|
# SQLite is used as the database. The SQLite file is stored in the data volume.
|
|
#
|
|
# In addition, this Docker Compose file adds the following optional
|
|
# configurations:
|
|
#
|
|
# - Apache Tika and Gotenberg servers are started with Paperless NGX and Paperless
|
|
# is configured to use these services. These provide support for consuming
|
|
# Office documents (Word, Excel, PowerPoint, and their LibreOffice counterparts).
|
|
#
|
|
# This file is intended only to be used through VSCOde devcontainers. See README.md
|
|
# in the folder .devcontainer.
|
|
services:
|
|
broker:
|
|
image: docker.io/library/redis:7
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./redisdata:/data
|
|
# No ports need to be exposed; the VSCode DevContainer plugin manages them.
|
|
paperless-development:
|
|
image: paperless-ngx
|
|
build:
|
|
context: ../ # Dockerfile cannot access files from parent directories if context is not set.
|
|
dockerfile: ./.devcontainer/Dockerfile
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- broker
|
|
- gotenberg
|
|
- tika
|
|
volumes:
|
|
- ..:/usr/src/paperless/paperless-ngx:delegated
|
|
- ../.devcontainer/vscode:/usr/src/paperless/paperless-ngx/.vscode:delegated # VSCode config files
|
|
- virtualenv:/usr/src/paperless/paperless-ngx/.venv # Virtual environment persisted in volume
|
|
- /usr/src/paperless/paperless-ngx/src/documents/static/frontend # Static frontend files exist only in container
|
|
- /usr/src/paperless/paperless-ngx/src/.pytest_cache
|
|
- /usr/src/paperless/paperless-ngx/.ruff_cache
|
|
- /usr/src/paperless/paperless-ngx/htmlcov
|
|
- /usr/src/paperless/paperless-ngx/.coverage
|
|
- ./data:/usr/src/paperless/paperless-ngx/data
|
|
- ./media:/usr/src/paperless/paperless-ngx/media
|
|
- ./consume:/usr/src/paperless/paperless-ngx/consume
|
|
environment:
|
|
PAPERLESS_REDIS: redis://broker:6379
|
|
PAPERLESS_TIKA_ENABLED: 1
|
|
PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000
|
|
PAPERLESS_TIKA_ENDPOINT: http://tika:9998
|
|
PAPERLESS_STATICDIR: ./src/documents/static
|
|
PAPERLESS_DEBUG: true
|
|
# Overrides default command so things don't shut down after the process ends.
|
|
command: /bin/sh -c "chown -R paperless:paperless /usr/src/paperless/paperless-ngx/src/documents/static/frontend && chown -R paperless:paperless /usr/src/paperless/paperless-ngx/.ruff_cache && while sleep 1000; do :; done"
|
|
gotenberg:
|
|
image: docker.io/gotenberg/gotenberg:8.17
|
|
restart: unless-stopped
|
|
# The Gotenberg Chromium route is used to convert .eml files. We do not
|
|
# want to allow external content like tracking pixels or even JavaScript.
|
|
command:
|
|
- "gotenberg"
|
|
- "--chromium-disable-javascript=true"
|
|
- "--chromium-allow-list=file:///tmp/.*"
|
|
tika:
|
|
image: docker.io/apache/tika:latest
|
|
restart: unless-stopped
|
|
volumes:
|
|
data:
|
|
media:
|
|
redisdata:
|
|
virtualenv:
|