flzta commited on
Commit
a34d0c0
·
verified ·
1 Parent(s): 7251fe4

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +52 -0
Dockerfile ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nanyangzesi/tgdrive:latest
2
+
3
+ RUN apk update && apk add --no-cache \
4
+ curl \
5
+ rclone \
6
+ dcron \
7
+ davfs2 \
8
+ ca-certificates \
9
+ python3 \
10
+ py3-pip \
11
+ tar \
12
+ bash \
13
+ rsync \
14
+ coreutils \
15
+ findutils
16
+
17
+ RUN python3 -m venv /app/venv && \
18
+ /app/venv/bin/pip install --no-cache-dir webdavclient3
19
+
20
+ WORKDIR /app
21
+
22
+ RUN mkdir -p /app/db
23
+ RUN mkdir -p /app/data
24
+ RUN mkdir -p /app/backup
25
+ RUN mkdir -p /app/logs
26
+ RUN mkdir -p /app/config
27
+
28
+ RUN chmod 777 /app/db
29
+ RUN chmod 777 /app/data
30
+ RUN chmod 777 /app/backup
31
+ RUN chmod 777 /app/logs
32
+ RUN chmod 777 /app/config
33
+
34
+ COPY sync-script.sh /app/
35
+ RUN chmod +x /app/sync-script.sh
36
+
37
+ COPY entrypoint.sh /app/
38
+ RUN chmod +x /app/entrypoint.sh
39
+
40
+ EXPOSE 8085
41
+
42
+ ENV WEBDAV_URL=""
43
+ ENV WEBDAV_USERNAME=""
44
+ ENV WEBDAV_PASSWORD=""
45
+ ENV SYNC_INTERVAL="60"
46
+ ENV PATH="/app/venv/bin:$PATH"
47
+ ENV REMOTE_BACKUP_DIR="tgdrive_backup"
48
+ ENV BACKUP_FILENAME="tgdrive_db_backup.tar.gz"
49
+ ENV DB_PATH="/app/db"
50
+ ENV BACKUP_PATH="/app/backup"
51
+
52
+ ENTRYPOINT ["/app/entrypoint.sh"]