Prepare for Docker deployment
This commit is contained in:
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user