mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-06-30 01:04:18 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2c9a0fc9d5 |
+1
-3
@@ -37,9 +37,7 @@ WORKDIR /usr/src/s6
|
||||
# https://github.com/just-containers/s6-overlay#customizing-s6-overlay-behaviour
|
||||
ENV \
|
||||
S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=60000 \
|
||||
S6_KILL_GRACETIME=30000 \
|
||||
S6_SERVICES_GRACETIME=30000 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||
S6_VERBOSITY=1 \
|
||||
PATH=/command:$PATH
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@ services:
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redisdata:/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "redis-cli ping | grep -q PONG || exit 1"]
|
||||
db:
|
||||
image: docker.io/library/mariadb:12
|
||||
restart: unless-stopped
|
||||
@@ -45,14 +47,20 @@ services:
|
||||
MARIADB_USER: paperless
|
||||
MARIADB_PASSWORD: paperless
|
||||
MARIADB_ROOT_PASSWORD: paperless
|
||||
healthcheck:
|
||||
test: ["CMD", "mariadb-admin", "ping", "-h", "localhost"]
|
||||
webserver:
|
||||
image: ghcr.io/paperless-ngx/paperless-ngx:latest
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
- broker
|
||||
- gotenberg
|
||||
- tika
|
||||
db:
|
||||
condition: service_healthy
|
||||
broker:
|
||||
condition: service_healthy
|
||||
gotenberg:
|
||||
condition: service_healthy
|
||||
tika:
|
||||
condition: service_started
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
@@ -80,6 +88,8 @@ services:
|
||||
- "gotenberg"
|
||||
- "--chromium-disable-javascript=true"
|
||||
- "--chromium-allow-list=file:///tmp/.*"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl --fail http://localhost:3000/health | grep -q '\"status\":\"up\"'"]
|
||||
tika:
|
||||
image: docker.io/apache/tika:latest
|
||||
restart: unless-stopped
|
||||
|
||||
@@ -30,6 +30,8 @@ services:
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redisdata:/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "redis-cli ping | grep -q PONG || exit 1"]
|
||||
db:
|
||||
image: docker.io/library/mariadb:12
|
||||
restart: unless-stopped
|
||||
@@ -41,12 +43,16 @@ services:
|
||||
MARIADB_USER: paperless
|
||||
MARIADB_PASSWORD: paperless
|
||||
MARIADB_ROOT_PASSWORD: paperless
|
||||
healthcheck:
|
||||
test: ["CMD", "mariadb-admin", "ping", "-h", "localhost"]
|
||||
webserver:
|
||||
image: ghcr.io/paperless-ngx/paperless-ngx:latest
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
- broker
|
||||
db:
|
||||
condition: service_healthy
|
||||
broker:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
|
||||
@@ -34,6 +34,8 @@ services:
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redisdata:/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "redis-cli ping | grep -q PONG || exit 1"]
|
||||
db:
|
||||
image: docker.io/library/postgres:18
|
||||
restart: unless-stopped
|
||||
@@ -43,14 +45,20 @@ services:
|
||||
POSTGRES_DB: paperless
|
||||
POSTGRES_USER: paperless
|
||||
POSTGRES_PASSWORD: paperless
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-U", "paperless"]
|
||||
webserver:
|
||||
image: ghcr.io/paperless-ngx/paperless-ngx:latest
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
- broker
|
||||
- gotenberg
|
||||
- tika
|
||||
db:
|
||||
condition: service_healthy
|
||||
broker:
|
||||
condition: service_healthy
|
||||
gotenberg:
|
||||
condition: service_healthy
|
||||
tika:
|
||||
condition: service_started
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
@@ -75,6 +83,8 @@ services:
|
||||
- "gotenberg"
|
||||
- "--chromium-disable-javascript=true"
|
||||
- "--chromium-allow-list=file:///tmp/.*"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl --fail http://localhost:3000/health | grep -q '\"status\":\"up\"'"]
|
||||
tika:
|
||||
image: docker.io/apache/tika:latest
|
||||
restart: unless-stopped
|
||||
|
||||
@@ -30,6 +30,8 @@ services:
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redisdata:/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "redis-cli ping | grep -q PONG || exit 1"]
|
||||
db:
|
||||
image: docker.io/library/postgres:18
|
||||
restart: unless-stopped
|
||||
@@ -39,12 +41,16 @@ services:
|
||||
POSTGRES_DB: paperless
|
||||
POSTGRES_USER: paperless
|
||||
POSTGRES_PASSWORD: paperless
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-U", "paperless"]
|
||||
webserver:
|
||||
image: ghcr.io/paperless-ngx/paperless-ngx:latest
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
- broker
|
||||
db:
|
||||
condition: service_healthy
|
||||
broker:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
|
||||
@@ -34,13 +34,18 @@ services:
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redisdata:/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "redis-cli ping | grep -q PONG || exit 1"]
|
||||
webserver:
|
||||
image: ghcr.io/paperless-ngx/paperless-ngx:latest
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- broker
|
||||
- gotenberg
|
||||
- tika
|
||||
broker:
|
||||
condition: service_healthy
|
||||
gotenberg:
|
||||
condition: service_healthy
|
||||
tika:
|
||||
condition: service_started
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
@@ -64,6 +69,8 @@ services:
|
||||
- "gotenberg"
|
||||
- "--chromium-disable-javascript=true"
|
||||
- "--chromium-allow-list=file:///tmp/.*"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl --fail http://localhost:3000/health | grep -q '\"status\":\"up\"'"]
|
||||
tika:
|
||||
image: docker.io/apache/tika:latest
|
||||
restart: unless-stopped
|
||||
|
||||
@@ -27,11 +27,14 @@ services:
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redisdata:/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "redis-cli ping | grep -q PONG || exit 1"]
|
||||
webserver:
|
||||
image: ghcr.io/paperless-ngx/paperless-ngx:latest
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- broker
|
||||
broker:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/command/with-contenv /usr/bin/bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if [[ -n "${PAPERLESS_CONSUMER_DISABLE}" ]]; then
|
||||
if [[ $1 -eq 0 ]]; then
|
||||
echo "[svc-consumer] Consumer is disabled, service did not run"
|
||||
else
|
||||
echo "[svc-consumer] Consumer is disabled, but service exited with error (exit code: $1, signal: $2)" >&2
|
||||
fi
|
||||
else
|
||||
if [[ $1 -eq 0 ]]; then
|
||||
echo "[svc-consumer] Service stopped cleanly (exit code: $1, signal: $2)"
|
||||
else
|
||||
echo "[svc-consumer] Service exited with error (exit code: $1, signal: $2)" >&2
|
||||
fi
|
||||
fi
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/command/with-contenv /usr/bin/bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if [[ -z "${PAPERLESS_ENABLE_FLOWER}" ]]; then
|
||||
if [[ $1 -eq 0 ]]; then
|
||||
echo "[svc-flower] Flower is disabled, service did not run"
|
||||
else
|
||||
echo "[svc-flower] Flower is disabled, but service exited with error (exit code: $1, signal: $2)" >&2
|
||||
fi
|
||||
else
|
||||
if [[ $1 -eq 0 ]]; then
|
||||
echo "[svc-flower] Service stopped cleanly (exit code: $1, signal: $2)"
|
||||
else
|
||||
echo "[svc-flower] Service exited with error (exit code: $1, signal: $2)" >&2
|
||||
fi
|
||||
fi
|
||||
@@ -6,6 +6,9 @@ declare -r log_prefix="[svc-flower]"
|
||||
echo "${log_prefix} Checking if we should start flower..."
|
||||
|
||||
if [[ -n "${PAPERLESS_ENABLE_FLOWER}" ]]; then
|
||||
# Small delay to allow celery to be up first
|
||||
echo "${log_prefix} Starting flower in 5s"
|
||||
sleep 5
|
||||
cd ${PAPERLESS_SRC_DIR}
|
||||
|
||||
if [[ -n "${USER_IS_NON_ROOT}" ]]; then
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/command/with-contenv /usr/bin/bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if [[ $1 -eq 0 ]]; then
|
||||
echo "[svc-scheduler] Service stopped cleanly (exit code: $1, signal: $2)"
|
||||
else
|
||||
echo "[svc-scheduler] Service exited with error (exit code: $1, signal: $2)" >&2
|
||||
fi
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/command/with-contenv /usr/bin/bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if [[ $1 -eq 0 ]]; then
|
||||
echo "[svc-webserver] Service stopped cleanly (exit code: $1, signal: $2)"
|
||||
else
|
||||
echo "[svc-webserver] Service exited with error (exit code: $1, signal: $2)" >&2
|
||||
fi
|
||||
@@ -1 +0,0 @@
|
||||
3
|
||||
@@ -14,7 +14,7 @@ if [[ -n "${PAPERLESS_FORCE_SCRIPT_NAME}" ]]; then
|
||||
fi
|
||||
|
||||
if [[ -n "${USER_IS_NON_ROOT}" ]]; then
|
||||
exec s6-notifyoncheck -d -w 1000 -- curl -sf "http://localhost:${GRANIAN_PORT}/" -- granian --interface asginl --ws --loop uvloop "paperless.asgi:application"
|
||||
exec granian --interface asginl --ws --loop uvloop "paperless.asgi:application"
|
||||
else
|
||||
exec s6-notifyoncheck -d -w 1000 -- curl -sf "http://localhost:${GRANIAN_PORT}/" -- s6-setuidgid paperless granian --interface asginl --ws --loop uvloop "paperless.asgi:application"
|
||||
exec s6-setuidgid paperless granian --interface asginl --ws --loop uvloop "paperless.asgi:application"
|
||||
fi
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/command/with-contenv /usr/bin/bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if [[ $1 -eq 0 ]]; then
|
||||
echo "[svc-worker] Service stopped cleanly (exit code: $1, signal: $2)"
|
||||
else
|
||||
echo "[svc-worker] Service exited with error (exit code: $1, signal: $2)" >&2
|
||||
fi
|
||||
@@ -1 +0,0 @@
|
||||
3
|
||||
@@ -4,7 +4,7 @@
|
||||
cd ${PAPERLESS_SRC_DIR}
|
||||
|
||||
if [[ -n "${USER_IS_NON_ROOT}" ]]; then
|
||||
exec s6-notifyoncheck -d -w 1000 -- sh -c 'celery --app paperless inspect ping --timeout 1' -- /usr/local/bin/celery --app paperless worker --loglevel INFO --without-mingle --without-gossip
|
||||
exec /usr/local/bin/celery --app paperless worker --loglevel INFO --without-mingle --without-gossip
|
||||
else
|
||||
exec s6-notifyoncheck -d -w 1000 -- sh -c 'celery --app paperless inspect ping --timeout 1' -- s6-setuidgid paperless /usr/local/bin/celery --app paperless worker --loglevel INFO --without-mingle --without-gossip
|
||||
exec s6-setuidgid paperless /usr/local/bin/celery --app paperless worker --loglevel INFO --without-mingle --without-gossip
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user