chore: deduplicate compose environment blocks
Use YAML anchor x-app-env for the shared worker/web environment vars. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+12
-20
@@ -8,14 +8,7 @@
|
||||
# Syncthing itself runs on the host (not in this compose). Copy .env.example
|
||||
# to .env for local overrides (e.g. DATA_HOST_DIR=./data). Never commit .env.
|
||||
|
||||
services:
|
||||
worker:
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
# Same UID as Syncthing (PUID=1002) so shared /data stays writable.
|
||||
user: "1002:1002"
|
||||
command: ["python3", "-m", "app.worker"]
|
||||
environment:
|
||||
x-app-env: &app-env
|
||||
DATA_DIR: /data
|
||||
OUTPUT_COUNT: ${OUTPUT_COUNT:-3}
|
||||
BLEND_OPACITY: ${BLEND_OPACITY:-30%}
|
||||
@@ -28,6 +21,16 @@ services:
|
||||
REMBG_MODEL: ${REMBG_MODEL:-u2net}
|
||||
REMBG_ALPHA: ${REMBG_ALPHA:-1}
|
||||
NICE_LEVEL: ${NICE_LEVEL:-18}
|
||||
|
||||
services:
|
||||
worker:
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
# Same UID as Syncthing (PUID=1002) so shared /data stays writable.
|
||||
user: "1002:1002"
|
||||
command: ["python3", "-m", "app.worker"]
|
||||
environment:
|
||||
<<: *app-env
|
||||
volumes:
|
||||
- ${DATA_HOST_DIR:-/home/frank/sync.schwenk.online/data/livef12}:/data
|
||||
- ./assets:/data/assets:ro
|
||||
@@ -48,18 +51,7 @@ services:
|
||||
depends_on:
|
||||
- worker
|
||||
environment:
|
||||
DATA_DIR: /data
|
||||
OUTPUT_COUNT: ${OUTPUT_COUNT:-3}
|
||||
BLEND_OPACITY: ${BLEND_OPACITY:-30%}
|
||||
BLEND_OPACITY_MIN: ${BLEND_OPACITY_MIN:-10}
|
||||
BLEND_OPACITY_MAX: ${BLEND_OPACITY_MAX:-50}
|
||||
FILTER_TIMEOUT: ${FILTER_TIMEOUT:-120}
|
||||
FILTER_TIMEOUT_LONG: ${FILTER_TIMEOUT_LONG:-300}
|
||||
MAX_FILTER_ATTEMPTS: ${MAX_FILTER_ATTEMPTS:-8}
|
||||
MAX_EDGE_PX: ${MAX_EDGE_PX:-2000}
|
||||
REMBG_MODEL: ${REMBG_MODEL:-u2net}
|
||||
REMBG_ALPHA: ${REMBG_ALPHA:-1}
|
||||
NICE_LEVEL: ${NICE_LEVEL:-18}
|
||||
<<: *app-env
|
||||
SITE_TITLE: live.f12.rocks
|
||||
volumes:
|
||||
- ${DATA_HOST_DIR:-/home/frank/sync.schwenk.online/data/livef12}:/data
|
||||
|
||||
Reference in New Issue
Block a user