-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (42 loc) · 1.48 KB
/
Dockerfile
File metadata and controls
53 lines (42 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM python:3.14-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
libjpeg-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
LABEL maintainer="thezak48" \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.url="https://github.com/thezak48/comps" \
org.opencontainers.image.source="https://github.com/thezak48/comps" \
org.opencontainers.image.version=$VERSION \
org.opencontainers.image.revision=$VCS_REF \
org.opencontainers.image.vendor="thezak48" \
org.opencontainers.image.title="comps" \
org.opencontainers.image.description="Comps is a open source self hostable version of Slowpoke Pics"
# Create app user and group
RUN groupadd -g 1000 appgroup && \
useradd -u 1000 -g appgroup -s /bin/bash appuser
# Create necessary directories
RUN mkdir -p /app/uploads /app/static /config /data
WORKDIR /app
# Copy requirements first for better caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY . .
# Create volume mount points
VOLUME ["/config", "/data"]
# Copy entrypoint script
COPY /docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
# Set default environment variables
ENV PUID=1000
ENV PGID=1000
ENV DB_PATH=/config/comparisons.db
ENV UPLOADS_PATH=/data/uploads
ENV RETENTION_DAYS=7
ENV ADMIN_INVITATION_CODE=change-me-in-production
# Expose port
EXPOSE 8000
# Set entrypoint
ENTRYPOINT ["/docker-entrypoint.sh"]