| FROM soyorins/imageflow |
|
|
| ENV STORAGE_TYPE="local" |
| ENV LOCAL_STORAGE_PATH="/app/static/images" |
| ENV S3_ENDPOINT="" |
| ENV S3_REGION="" |
| ENV S3_ACCESS_KEY="" |
| ENV S3_SECRET_KEY="" |
| ENV S3_BUCKET="" |
| ENV CUSTOM_DOMAIN="" |
| ENV MAX_UPLOAD_COUNT="20" |
| ENV IMAGE_QUALITY="80" |
| ENV WORKER_THREADS="4" |
| ENV COMPRESSION_EFFORT="6" |
| ENV FORCE_LOSSLESS="false" |
|
|
| |
| ENV WEBDAV_URL="" |
| ENV WEBDAV_USERNAME="" |
| ENV WEBDAV_PASSWORD="" |
| ENV WEBDAV_BACKUP_PATH="" |
| ENV SYNC_INTERVAL="600" |
|
|
| |
| RUN apk add --no-cache python3 py3-pip curl tar shadow |
|
|
| |
| RUN mkdir -p /app/static/images/metadata \ |
| /app/static/images/original/landscape \ |
| /app/static/images/original/portrait \ |
| /app/static/images/landscape/webp \ |
| /app/static/images/landscape/avif \ |
| /app/static/images/portrait/webp \ |
| /app/static/images/portrait/avif \ |
| /app/static/images/gif |
|
|
| |
| RUN chmod -R 777 /app/static/images && \ |
| chown -R nobody:nobody /app/static/images |
|
|
| RUN touch /app/.env && chmod 666 /app/.env |
|
|
| ENV APP_DIR="/app" |
| ENV APP_NAME="image" |
| ENV APP_SUFFIX="flow" |
|
|
| |
| RUN pip3 install --no-cache-dir requests webdavclient3 --break-system-packages |
|
|
| |
| COPY sync_data.sh /app/ |
| RUN chmod +x /app/sync_data.sh |
|
|
| |
| RUN adduser -D -u 1000 appuser |
| RUN chown -R appuser:appuser /app |
|
|
| |
| WORKDIR /app |
|
|
| |
| CMD ["/bin/sh", "-c", "/app/sync_data.sh & sleep 30 && $APP_DIR/$APP_NAME$APP_SUFFIX"] |