Prepare for Docker deployment
This commit is contained in:
12
.env.example
12
.env.example
@@ -1,4 +1,3 @@
|
||||
# Server (dev only)
|
||||
HOST=0.0.0.0
|
||||
PORT=8080
|
||||
MAX_CONCURRENT=3
|
||||
@@ -7,7 +6,7 @@ ADMIN_PASSWORD=test123
|
||||
TIMEZONE=America/Edmonton
|
||||
|
||||
# Public uploader page (optional) — disabled by default
|
||||
PUBLIC_UPLOAD_PAGE_ENABLED=TRUE
|
||||
PUBLIC_UPLOAD_PAGE_ENABLED=false
|
||||
|
||||
# Local dedupe cache (SQLite)
|
||||
STATE_DB=./data/state.db
|
||||
@@ -16,13 +15,14 @@ STATE_DB=./data/state.db
|
||||
# e.g., PUBLIC_BASE_URL=https://photos.example.com
|
||||
#PUBLIC_BASE_URL=
|
||||
|
||||
# Session and security
|
||||
SESSION_SECRET=SET-A-STRONG-RANDOM-VALUE
|
||||
LOG_LEVEL=DEBUG
|
||||
LOG_LEVEL=INFO
|
||||
|
||||
# Chunked uploads (to work around 100MB proxy limits)
|
||||
# Enable to send files in chunks from browser to this service; the service reassembles and forwards to Immich.
|
||||
# Enable to send files in chunks from browser to this service
|
||||
# Recommended chunk size for Cloudflare Tunnel is <= 95MB.
|
||||
CHUNKED_UPLOADS_ENABLED=false
|
||||
CHUNK_SIZE_MB=95
|
||||
|
||||
# Custom session secrets
|
||||
# By default, a random one is generated
|
||||
#SESSION_SECRET=SET-A-STRONG-RANDOM-VALUE
|
||||
|
||||
19
Dockerfile
19
Dockerfile
@@ -1,28 +1,27 @@
|
||||
# syntax=docker/dockerfile:1.7
|
||||
FROM python:3.11-slim
|
||||
|
||||
WORKDIR /immich_drop
|
||||
WORKDIR /image_drop
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1
|
||||
|
||||
# Install Python deps
|
||||
COPY requirements.txt /app/requirements.txt
|
||||
RUN pip install --no-cache-dir -r /app/requirements.txt \
|
||||
&& pip install --no-cache-dir python-multipart
|
||||
|
||||
# Copy app code
|
||||
COPY . /immich_drop
|
||||
COPY . /image_drop
|
||||
|
||||
# Install Python deps
|
||||
RUN pip install --no-cache-dir -r requirements.txt \
|
||||
&& pip install --no-cache-dir python-multipart
|
||||
|
||||
|
||||
# Data dir for SQLite (state.db)
|
||||
RUN mkdir -p /data
|
||||
VOLUME ["/data"]
|
||||
#RUN mkdir -p /data
|
||||
#VOLUME ["/data"]
|
||||
|
||||
# Defaults (can be overridden via compose env)
|
||||
ENV HOST=0.0.0.0 \
|
||||
PORT=8080 \
|
||||
STATE_DB=/data/state.db
|
||||
STATE_DB=/image_drop/data/state.db
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
|
||||
@@ -1,23 +1,17 @@
|
||||
services:
|
||||
immich-drop:
|
||||
image-drop:
|
||||
build: .
|
||||
container_name: immich-drop
|
||||
container_name: image-drop
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:8080"
|
||||
|
||||
env_file:
|
||||
- .env
|
||||
|
||||
|
||||
volumes:
|
||||
- immich_drop_data:/data
|
||||
- ./data:/image_drop/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "python - <<'PY'\nimport urllib.request,sys\ntry:\n urllib.request.urlopen('http://localhost:8080/').read(); sys.exit(0)\nexcept Exception:\n sys.exit(1)\nPY"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
volumes:
|
||||
immich_drop_data:
|
||||
|
||||
Reference in New Issue
Block a user