services: webserver: image: ghcr.io/paperless-ngx/paperless-ngx:3.3 restart: unless-stopped environment: # Its task queue and cache, in the Valkey database linked to the project, and its # documents' records in the Postgres one: it waits for both at its start, then migrates. PAPERLESS_REDIS: ${REDIS_URL:?reload New project to link a Valkey database, or send link_databases with env_prefix REDIS} PAPERLESS_DBENGINE: postgresql PAPERLESS_DBHOST: ${DATABASE_HOST:?reload New project to link a Postgres database, or send link_databases with env_prefix DATABASE} PAPERLESS_DBPORT: ${DATABASE_PORT:?reload New project to link a Postgres database, or send link_databases with env_prefix DATABASE} PAPERLESS_DBNAME: ${DATABASE_NAME:?reload New project to link a Postgres database, or send link_databases with env_prefix DATABASE} PAPERLESS_DBUSER: ${DATABASE_USER:?reload New project to link a Postgres database, or send link_databases with env_prefix DATABASE} PAPERLESS_DBPASS: ${DATABASE_PASSWORD:?reload New project to link a Postgres database, or send link_databases with env_prefix DATABASE} PAPERLESS_URL: ${PAPERLESS_URL} PAPERLESS_SECRET_KEY: ${PAPERLESS_SECRET_KEY} # The first start makes this superuser, so no sign-up page is left open. PAPERLESS_ADMIN_USER: admin PAPERLESS_ADMIN_PASSWORD: ${ADMIN_PASSWORD} # TLS ends at the machine's proxy, which says so in X-Forwarded-Proto. PAPERLESS_PROXY_SSL_HEADER: '["HTTP_X_FORWARDED_PROTO", "https"]' # The mail provider picked in New project, by STARTTLS on its port. With none, the host # is localhost, which Paperless-ngx takes for no mail, and the port stays a number. PAPERLESS_EMAIL_HOST: ${SMTP_HOST:-localhost} PAPERLESS_EMAIL_PORT: ${SMTP_PORT:-25} PAPERLESS_EMAIL_HOST_USER: ${SMTP_USER} PAPERLESS_EMAIL_HOST_PASSWORD: ${SMTP_PASSWORD} PAPERLESS_EMAIL_FROM: ${SMTP_FROM} PAPERLESS_EMAIL_USE_TLS: "true" volumes: - data:/usr/src/paperless/data - media:/usr/src/paperless/media - export:/usr/src/paperless/export - consume:/usr/src/paperless/consume healthcheck: # The image's own check, with time for the first start's migrations. test: ["CMD", "curl", "-fs", "-S", "-L", "--max-time", "2", "http://localhost:8000"] interval: 30s timeout: 10s retries: 5 start_period: 180s volumes: data: media: export: consume: