File size: 1,007 Bytes
c1ccdca
 
 
 
 
 
 
 
 
 
 
e1ffe54
 
 
 
c1ccdca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM nanyangzesi/tgdrive:latest

RUN apk update && apk add --no-cache \
    curl \
    rclone \
    dcron \
    davfs2 \
    ca-certificates \
    python3 \
    py3-pip \
    tar \
    bash \
    rsync \
    coreutils \
    findutils

RUN python3 -m venv /app/venv && \
    /app/venv/bin/pip install --no-cache-dir webdavclient3

WORKDIR /app

RUN mkdir -p /app/db
RUN mkdir -p /app/data
RUN mkdir -p /app/backup
RUN mkdir -p /app/logs
RUN mkdir -p /app/config

RUN chmod 777 /app/db
RUN chmod 777 /app/data
RUN chmod 777 /app/backup
RUN chmod 777 /app/logs
RUN chmod 777 /app/config

COPY sync-script.sh /app/
RUN chmod +x /app/sync-script.sh

COPY entrypoint.sh /app/
RUN chmod +x /app/entrypoint.sh

EXPOSE 8085

ENV WEBDAV_URL=""
ENV WEBDAV_USERNAME=""
ENV WEBDAV_PASSWORD=""
ENV SYNC_INTERVAL="60"
ENV PATH="/app/venv/bin:$PATH"
ENV REMOTE_BACKUP_DIR="tgdrive_backup"
ENV BACKUP_FILENAME="tgdrive_db_backup.tar.gz"
ENV DB_PATH="/app/db"
ENV BACKUP_PATH="/app/backup"

ENTRYPOINT ["/app/entrypoint.sh"]