Spaces:
coolmanx
/
Running

coolmanx commited on
Commit
fb90b7f
·
verified ·
1 Parent(s): c33f4c1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -15
Dockerfile CHANGED
@@ -60,7 +60,14 @@ RUN --mount=type=secret,id=MYSQL_HOST,mode=0444,required=true \
60
  }\n\
61
  }" > $HOME/alist/data/config.json
62
 
63
- RUN cat config.json
 
 
 
 
 
 
 
64
 
65
  RUN --mount=type=secret,id=MYSQL_HOST,mode=0444,required=true \
66
  --mount=type=secret,id=MYSQL_PORT,mode=0444,required=true \
@@ -72,22 +79,15 @@ RUN --mount=type=secret,id=MYSQL_HOST,mode=0444,required=true \
72
  ENV_MYSQL_USER=$(cat /run/secrets/MYSQL_USER) && \
73
  ENV_MYSQL_PASSWORD=$(cat /run/secrets/MYSQL_PASSWORD) && \
74
  ENV_MYSQL_DATABASE=$(cat /run/secrets/MYSQL_DATABASE) && \
75
- sed -i "s/MYSQL_HOST/${ENV_MYSQL_HOST:-localhost}/g" config.json && \
76
- sed -i "s/MYSQL_PORT/${ENV_MYSQL_PORT:-3306}/g" config.json && \
77
- sed -i "s/MYSQL_USER/${ENV_MYSQL_USER:-root}/g" config.json && \
78
- sed -i "s/MYSQL_PASSWORD/${ENV_MYSQL_PASSWORD:-password}/g" config.json && \
79
- sed -i "s/MYSQL_DATABASE/${ENV_MYSQL_PASSWORD:-alist}/g" config.json
80
 
81
- RUN cat config.json
82
 
83
- RUN cp -f config.json $HOME/alist/data/config.json
84
-
85
- #download cfg and unzip
86
- #RUN curl -L -o cfga.zip https://github.com/twhite-gh/twhite-gh/raw/refs/heads/main/cfga.zip
87
- #RUN --mount=type=secret,id=ZIP_PWD,mode=0444,required=true unzip -P $(cat /run/secrets/ZIP_PWD) cfga.zip
88
- #RUN cp -f config.json $HOME/alist/data/config.json
89
-
90
- COPY --chown=user . $HOME/alist
91
 
92
  RUN chmod +x $HOME/alist/tvbox
93
  # CMD ["bash", "alist", "server"]
 
60
  }\n\
61
  }" > $HOME/alist/data/config.json
62
 
63
+ #download cfg and unzip
64
+ #RUN curl -L -o cfga.zip https://github.com/twhite-gh/twhite-gh/raw/refs/heads/main/cfga.zip
65
+ #RUN --mount=type=secret,id=ZIP_PWD,mode=0444,required=true unzip -P $(cat /run/secrets/ZIP_PWD) cfga.zip
66
+ #RUN cp -f config.json $HOME/alist/data/config.json
67
+
68
+ COPY --chown=user . $HOME/alist
69
+
70
+ RUN cat $HOME/alist/config.json
71
 
72
  RUN --mount=type=secret,id=MYSQL_HOST,mode=0444,required=true \
73
  --mount=type=secret,id=MYSQL_PORT,mode=0444,required=true \
 
79
  ENV_MYSQL_USER=$(cat /run/secrets/MYSQL_USER) && \
80
  ENV_MYSQL_PASSWORD=$(cat /run/secrets/MYSQL_PASSWORD) && \
81
  ENV_MYSQL_DATABASE=$(cat /run/secrets/MYSQL_DATABASE) && \
82
+ sed -i "s/MYSQL_HOST/${ENV_MYSQL_HOST:-localhost}/g" $HOME/alist/config.json && \
83
+ sed -i "s/MYSQL_PORT/${ENV_MYSQL_PORT:-3306}/g" $HOME/alist/config.json && \
84
+ sed -i "s/MYSQL_USER/${ENV_MYSQL_USER:-root}/g" $HOME/alist/config.json && \
85
+ sed -i "s/MYSQL_PASSWORD/${ENV_MYSQL_PASSWORD:-password}/g" $HOME/alist/config.json && \
86
+ sed -i "s/MYSQL_DATABASE/${ENV_MYSQL_PASSWORD:-alist}/g" $HOME/alist/config.json
87
 
88
+ RUN cat $HOME/alist/config.json
89
 
90
+ RUN cp -f $HOME/alist/config.json $HOME/alist/data/config.json
 
 
 
 
 
 
 
91
 
92
  RUN chmod +x $HOME/alist/tvbox
93
  # CMD ["bash", "alist", "server"]