mirror of
https://github.com/linuxserver/docker-lychee.git
synced 2026-02-05 19:09:11 +08:00
blah
This commit is contained in:
parent
068feeb898
commit
0ed3207e20
10
Dockerfile
10
Dockerfile
@ -7,7 +7,6 @@ ARG VERSION
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
|
||||
# package version
|
||||
ARG LYCHEE_VERSION="3.1.5"
|
||||
ARG PHP_IMAGICK_VER="3.4.2"
|
||||
|
||||
# install build packages
|
||||
@ -35,14 +34,19 @@ RUN \
|
||||
php7-session \
|
||||
php7-zip && \
|
||||
|
||||
# install lychee
|
||||
mkdir -p \
|
||||
/usr/share/webapps/lychee && \
|
||||
lychee_tag=$(curl -sX GET "https://api.github.com/repos/electerious/Lychee/releases/latest" \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
|
||||
curl -o \
|
||||
/tmp/lychee.tar.gz -L \
|
||||
"https://github.com/electerious/Lychee/archive/v${LYCHEE_VERSION}.tar.gz" && \
|
||||
"https://github.com/electerious/Lychee/archive/${lychee_tag}.tar.gz" && \
|
||||
tar xf \
|
||||
/tmp/lychee.tar.gz -C \
|
||||
/usr/share/webapps/lychee --strip-components=1 && \
|
||||
if [ -e /usr/share/webapps/lychee/.user.ini ]; then rm /usr/share/webapps/lychee/.user.ini; fi && \
|
||||
|
||||
# install php imagemagick
|
||||
mkdir -p \
|
||||
/tmp/imagick-src && \
|
||||
@ -72,4 +76,4 @@ COPY root/ /
|
||||
|
||||
# ports and volumes
|
||||
EXPOSE 80
|
||||
VOLUME /config
|
||||
VOLUME /config /pictures
|
||||
|
||||
@ -1,26 +1,30 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# make symlinks
|
||||
[[ ! -e /var/www/localhost/lychee ]] && \
|
||||
# create our folders
|
||||
mkdir -p \
|
||||
/config/lychee \
|
||||
/pictures/{big,import,medium,thumb}
|
||||
|
||||
# copy config
|
||||
[[ ! -e /config/lychee/user.ini ]] && \
|
||||
cp /defaults/user.ini /config/lychee/user.ini
|
||||
cp /config/lychee/user.ini /usr/share/webapps/lychee/.user.ini
|
||||
|
||||
# create symlinks
|
||||
[[ ! -L /var/www/localhost/lychee ]] && \
|
||||
ln -s /usr/share/webapps/lychee /var/www/localhost/lychee
|
||||
|
||||
[[ ! -e /config/lychee/data ]]
|
||||
mkdir -p /config/lychee && \
|
||||
cp -R /usr/share/webapps/lychee/data /config/lychee && \
|
||||
rm -rf /usr/share/webapps/lychee/data
|
||||
|
||||
[[ ! -e /config/lychee/uploads ]]
|
||||
cp -R /usr/share/webapps/lychee/uploads /config/lychee && \
|
||||
[[ -d /usr/share/webapps/lychee/uploads ]] && \
|
||||
rm -rf /usr/share/webapps/lychee/uploads
|
||||
|
||||
[[ ! -e /usr/share/webapps/lychee/data ]]
|
||||
ln -s /config/lychee/data /usr/share/webapps/lychee/data
|
||||
|
||||
[[ ! -e /usr/share/webapps/lychee/uploads ]]
|
||||
ln -s /config/lychee/uploads /usr/share/webapps/lychee/uploads
|
||||
[[ ! -L /usr/share/webapps/lychee/uploads ]] && \
|
||||
ln -s /pictures /usr/share/webapps/lychee/uploads
|
||||
[[ -d /usr/share/webapps/lychee/data ]] && \
|
||||
rm -rf /usr/share/webapps/lychee/data
|
||||
[[ ! -L /usr/share/webapps/lychee/data ]]
|
||||
ln -s /config/lychee /usr/share/webapps/lychee/data
|
||||
|
||||
# permissions
|
||||
chown -R abc:abc \
|
||||
/config \
|
||||
/pictures \
|
||||
/usr/share/webapps/lychee \
|
||||
/var/www/localhost/lychee
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user