Add mount-free Synology Photos API sources with bounded image cache
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# Reuse a reviewed image only when the locked Python dependencies are identical.
|
||||
# For a fresh installation use the repository's main Dockerfile instead.
|
||||
ARG BASE_IMAGE
|
||||
FROM ${BASE_IMAGE}
|
||||
COPY requirements.lock /app/requirements.expected.lock
|
||||
RUN python -c "from pathlib import Path; assert Path('/app/requirements.lock').read_bytes() == Path('/app/requirements.expected.lock').read_bytes(), 'Dependency lock changed; use the full Dockerfile'"
|
||||
COPY pigway_frame_flow /app/pigway_frame_flow
|
||||
COPY vendor /app/vendor
|
||||
ARG BUILD_COMMIT
|
||||
ARG BUILD_TIME
|
||||
ENV BUILD_COMMIT=$BUILD_COMMIT BUILD_TIME=$BUILD_TIME
|
||||
LABEL org.opencontainers.image.title="Pigway Frame Flow" org.opencontainers.image.version="0.1.9" org.opencontainers.image.revision=$BUILD_COMMIT
|
||||
@@ -0,0 +1,51 @@
|
||||
# Candidate only. Never start alongside a live-writing NAS instance.
|
||||
name: pigway-frame-flow
|
||||
services:
|
||||
pigway-frame-flow:
|
||||
image: ${FRAME_FLOW_IMAGE:?Set the verified immutable image reference}
|
||||
container_name: pigway-frame-flow
|
||||
platform: linux/amd64
|
||||
restart: unless-stopped
|
||||
init: true
|
||||
user: "10333:10333"
|
||||
ports:
|
||||
- "${FRAME_FLOW_BIND:-192.0.2.10}:81:18787"
|
||||
env_file: ${FRAME_FLOW_ENV_FILE:-/srv/pigway/apps/pigway-frame-flow/.env}
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
DATA_DIR: /data
|
||||
CONFIG_DIR: /config
|
||||
FRAME_FLOW_STORAGE_NAME: Ubuntu Server
|
||||
SYNOLOGY_PHOTOS_CACHE_BYTES: ${SYNOLOGY_PHOTOS_CACHE_BYTES:-268435456}
|
||||
# Migration starts read-only. Activation is a separate authorized action.
|
||||
KOKONNA_WRITE_ENABLED: "false"
|
||||
PYTHONDONTWRITEBYTECODE: "1"
|
||||
TMPDIR: /data/tmp
|
||||
volumes:
|
||||
- type: bind
|
||||
source: /srv/pigway/apps/pigway-frame-flow/data
|
||||
target: /data
|
||||
bind:
|
||||
create_host_path: false
|
||||
- type: bind
|
||||
source: /srv/pigway/apps/pigway-frame-flow/config
|
||||
target: /config
|
||||
bind:
|
||||
create_host_path: false
|
||||
read_only: true
|
||||
cap_drop: [ALL]
|
||||
security_opt: [no-new-privileges:true]
|
||||
pids_limit: 100
|
||||
mem_limit: 768m
|
||||
healthcheck:
|
||||
test: [CMD, python, -c, "import urllib.request; urllib.request.urlopen('http://127.0.0.1:18787/ready',timeout=3)"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
start_period: 20s
|
||||
retries: 3
|
||||
# Docker data-root and container logs must reside on the T7 too.
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: 10m
|
||||
max-file: "3"
|
||||
Reference in New Issue
Block a user