File size: 1,021 Bytes
7494965
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM alpine:3.19

# 1. Install System Dependencies (Redis, Git, Curl, Python3)
RUN apk add --no-cache \
    redis \
    git \
    curl \
    python3 \
    py3-pip \
    libevent \
    libevent-dev \
    gcc \
    make \
    musl-dev \
    bsd-compat-headers

# 2. Compile Webdis REST Gateway from source
RUN git clone --depth 1 https://github.com/nicolasff/webdis.git /tmp/webdis \
    && cd /tmp/webdis \
    && make \
    && cp webdis /usr/local/bin/ \
    && rm -rf /tmp/webdis

# 3. Clean up compile dependencies to keep image size small
RUN apk del gcc make musl-dev libevent-dev bsd-compat-headers

# 4. Install Boto3 for Cloudflare R2 AWS S3 integrations
RUN pip install --no-cache-dir --break-system-packages boto3

# 5. Create app directories and copy configurations
WORKDIR /app
COPY webdis.json /app/webdis.json
COPY entrypoint.sh /app/entrypoint.sh
COPY backup.py /app/backup.py

RUN chmod +x /app/entrypoint.sh

# Expose Webdis HTTP Port (Hugging Face default)
EXPOSE 7860

ENTRYPOINT ["/app/entrypoint.sh"]