Skip to content

Commit 1e575a1

Browse files
authored
Merge pull request #36 from linuxserver/v4
upgrade for lychee v4 with an upgrade path from v3 to v4
2 parents 154f1c8 + 6a4bac0 commit 1e575a1

File tree

8 files changed

+281
-159
lines changed

8 files changed

+281
-159
lines changed

Dockerfile

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,61 @@
1-
FROM lsiobase/nginx:3.11
1+
FROM lsiobase/nginx:3.12
22

33
# set version label
44
ARG BUILD_DATE
55
ARG VERSION
6-
ARG LYCHEE_RELEASE
6+
ARG LYCHEE_VERSION
77
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
8-
LABEL maintainer="chbmb"
8+
LABEL maintainer="hackerman"
99

1010
RUN \
11-
echo "**** install packages ****" && \
11+
echo "**** install build packages ****" && \
12+
apk add --no-cache --virtual=build-dependencies \
13+
git \
14+
composer && \
15+
echo "**** install runtime packages ****" && \
1216
apk add --no-cache \
1317
curl \
14-
imagemagick \
15-
jq \
16-
mc \
18+
exiftool \
1719
ffmpeg \
18-
php7-curl \
20+
gd \
21+
imagemagick \
22+
php7-dom \
1923
php7-exif \
2024
php7-gd \
2125
php7-imagick \
26+
php7-json \
27+
php7-mbstring \
2228
php7-mysqli \
23-
php7-mysqlnd \
24-
php7-phar \
25-
php7-zip \
26-
re2c && \
29+
php7-pdo_mysql \
30+
php7-session \
31+
php7-tokenizer \
32+
php7-xml \
33+
php7-zip && \
2734
echo "**** install lychee ****" && \
28-
if [ -z ${LYCHEE_RELEASE+x} ]; then \
29-
LYCHEE_RELEASE=$(curl -sX GET "https://api.github.com/repos/LycheeOrg/Lychee/releases/latest" \
35+
mkdir -p /app/lychee && \
36+
if [ -z ${LYCHEE_VERSION} ]; then \
37+
LYCHEE_VERSION=$(curl -sX GET "https://api.github.com/repos/LycheeOrg/Lychee/releases/latest" \
3038
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
3139
fi && \
32-
LYCHEE_FILENAME=$(curl -sX GET "https://api.github.com/repos/LycheeOrg/Lychee/releases/latest" \
33-
| jq -jr '. | .assets[0].name') && \
34-
mkdir -p \
35-
/usr/share/webapps/lychee && \
3640
curl -o \
37-
/tmp/lychee.zip -L \
38-
"https://github.com/LycheeOrg/Lychee/releases/download/${LYCHEE_RELEASE}/${LYCHEE_FILENAME}" && \
39-
unzip /tmp/lychee.zip -d /tmp && \
40-
cp -R /tmp/Lychee*/. /usr/share/webapps/lychee/ && \
41-
echo "**** install composer ****" && \
42-
cd /tmp && \
43-
curl -sS https://getcomposer.org/installer | php && \
44-
mv /tmp/composer.phar /usr/local/bin/composer && \
41+
/tmp/lychee.tar.gz -L \
42+
"https://github.com/LycheeOrg/Lychee/archive/${LYCHEE_VERSION}.tar.gz" && \
43+
tar xf \
44+
/tmp/lychee.tar.gz -C \
45+
/app/lychee/ --strip-components=1 && \
46+
cd /app/lychee && \
4547
echo "**** install composer dependencies ****" && \
46-
composer install -d /usr/share/webapps/lychee && \
48+
composer install \
49+
-d /app/lychee \
50+
--no-dev \
51+
--no-suggest \
52+
--no-interaction && \
4753
echo "**** cleanup ****" && \
54+
apk del --purge \
55+
build-dependencies && \
4856
rm -rf \
57+
/root/.cache \
4958
/tmp/*
5059

5160
# add local files
5261
COPY root/ /
53-
54-
# ports and volumes
55-
EXPOSE 80
56-
VOLUME /config /pictures

Dockerfile.aarch64

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,59 @@ FROM lsiobase/nginx:arm64v8-3.11
33
# set version label
44
ARG BUILD_DATE
55
ARG VERSION
6-
ARG LYCHEE_RELEASE
6+
ARG LYCHEE_VERSION
77
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
8-
LABEL maintainer="chbmb"
8+
LABEL maintainer="hackerman"
99

1010
RUN \
11-
echo "**** install packages ****" && \
11+
echo "**** install build packages ****" && \
12+
apk add --no-cache --virtual=build-dependencies \
13+
git \
14+
composer && \
15+
echo "**** install runtime packages ****" && \
1216
apk add --no-cache \
1317
curl \
14-
imagemagick \
15-
jq \
16-
mc \
18+
exiftool \
1719
ffmpeg \
18-
php7-curl \
20+
gd \
21+
imagemagick \
22+
php7-dom \
1923
php7-exif \
2024
php7-gd \
2125
php7-imagick \
26+
php7-json \
27+
php7-mbstring \
2228
php7-mysqli \
23-
php7-mysqlnd \
24-
php7-phar \
25-
php7-zip \
26-
re2c && \
29+
php7-pdo_mysql \
30+
php7-session \
31+
php7-tokenizer \
32+
php7-xml \
33+
php7-zip && \
2734
echo "**** install lychee ****" && \
28-
if [ -z ${LYCHEE_RELEASE+x} ]; then \
29-
LYCHEE_RELEASE=$(curl -sX GET "https://api.github.com/repos/LycheeOrg/Lychee/releases/latest" \
35+
mkdir -p /app/lychee && \
36+
if [ -z ${LYCHEE_VERSION} ]; then \
37+
LYCHEE_VERSION=$(curl -sX GET "https://api.github.com/repos/LycheeOrg/Lychee/releases/latest" \
3038
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
3139
fi && \
32-
LYCHEE_FILENAME=$(curl -sX GET "https://api.github.com/repos/LycheeOrg/Lychee/releases/latest" \
33-
| jq -jr '. | .assets[0].name') && \
34-
mkdir -p \
35-
/usr/share/webapps/lychee && \
3640
curl -o \
37-
/tmp/lychee.zip -L \
38-
"https://github.com/LycheeOrg/Lychee/releases/download/${LYCHEE_RELEASE}/${LYCHEE_FILENAME}" && \
39-
unzip /tmp/lychee.zip -d /tmp && \
40-
cp -R /tmp/Lychee*/. /usr/share/webapps/lychee/ && \
41-
echo "**** install composer ****" && \
42-
cd /tmp && \
43-
curl -sS https://getcomposer.org/installer | php && \
44-
mv /tmp/composer.phar /usr/local/bin/composer && \
41+
/tmp/lychee.tar.gz -L \
42+
"https://github.com/LycheeOrg/Lychee/archive/${LYCHEE_VERSION}.tar.gz" && \
43+
tar xf \
44+
/tmp/lychee.tar.gz -C \
45+
/app/lychee/ --strip-components=1 && \
46+
cd /app/lychee && \
4547
echo "**** install composer dependencies ****" && \
46-
composer install -d /usr/share/webapps/lychee && \
48+
composer install \
49+
-d /app/lychee \
50+
--no-dev \
51+
--no-suggest \
52+
--no-interaction && \
4753
echo "**** cleanup ****" && \
54+
apk del --purge \
55+
build-dependencies && \
4856
rm -rf \
57+
/root/.cache \
4958
/tmp/*
5059

5160
# add local files
5261
COPY root/ /
53-
54-
# ports and volumes
55-
EXPOSE 80
56-
VOLUME /config /pictures

Dockerfile.armhf

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,59 @@ FROM lsiobase/nginx:arm32v7-3.11
33
# set version label
44
ARG BUILD_DATE
55
ARG VERSION
6-
ARG LYCHEE_RELEASE
6+
ARG LYCHEE_VERSION
77
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
8-
LABEL maintainer="chbmb"
8+
LABEL maintainer="hackerman"
99

1010
RUN \
11-
echo "**** install packages ****" && \
11+
echo "**** install build packages ****" && \
12+
apk add --no-cache --virtual=build-dependencies \
13+
git \
14+
composer && \
15+
echo "**** install runtime packages ****" && \
1216
apk add --no-cache \
1317
curl \
14-
imagemagick \
15-
jq \
16-
mc \
18+
exiftool \
1719
ffmpeg \
18-
php7-curl \
20+
gd \
21+
imagemagick \
22+
php7-dom \
1923
php7-exif \
2024
php7-gd \
2125
php7-imagick \
26+
php7-json \
27+
php7-mbstring \
2228
php7-mysqli \
23-
php7-mysqlnd \
24-
php7-phar \
25-
php7-zip \
26-
re2c && \
29+
php7-pdo_mysql \
30+
php7-session \
31+
php7-tokenizer \
32+
php7-xml \
33+
php7-zip && \
2734
echo "**** install lychee ****" && \
28-
if [ -z ${LYCHEE_RELEASE+x} ]; then \
29-
LYCHEE_RELEASE=$(curl -sX GET "https://api.github.com/repos/LycheeOrg/Lychee/releases/latest" \
35+
mkdir -p /app/lychee && \
36+
if [ -z ${LYCHEE_VERSION} ]; then \
37+
LYCHEE_VERSION=$(curl -sX GET "https://api.github.com/repos/LycheeOrg/Lychee/releases/latest" \
3038
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
3139
fi && \
32-
LYCHEE_FILENAME=$(curl -sX GET "https://api.github.com/repos/LycheeOrg/Lychee/releases/latest" \
33-
| jq -jr '. | .assets[0].name') && \
34-
mkdir -p \
35-
/usr/share/webapps/lychee && \
3640
curl -o \
37-
/tmp/lychee.zip -L \
38-
"https://github.com/LycheeOrg/Lychee/releases/download/${LYCHEE_RELEASE}/${LYCHEE_FILENAME}" && \
39-
unzip /tmp/lychee.zip -d /tmp && \
40-
cp -R /tmp/Lychee*/. /usr/share/webapps/lychee/ && \
41-
echo "**** install composer ****" && \
42-
cd /tmp && \
43-
curl -sS https://getcomposer.org/installer | php && \
44-
mv /tmp/composer.phar /usr/local/bin/composer && \
41+
/tmp/lychee.tar.gz -L \
42+
"https://github.com/LycheeOrg/Lychee/archive/${LYCHEE_VERSION}.tar.gz" && \
43+
tar xf \
44+
/tmp/lychee.tar.gz -C \
45+
/app/lychee/ --strip-components=1 && \
46+
cd /app/lychee && \
4547
echo "**** install composer dependencies ****" && \
46-
composer install -d /usr/share/webapps/lychee && \
48+
composer install \
49+
-d /app/lychee \
50+
--no-dev \
51+
--no-suggest \
52+
--no-interaction && \
4753
echo "**** cleanup ****" && \
54+
apk del --purge \
55+
build-dependencies && \
4856
rm -rf \
57+
/root/.cache \
4958
/tmp/*
5059

5160
# add local files
5261
COPY root/ /
53-
54-
# ports and volumes
55-
EXPOSE 80
56-
VOLUME /config /pictures

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ Find us at:
3535
[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-lychee%2Fjob%2Fmaster%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-lychee/job/master/)
3636
[![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Flsio-ci.ams3.digitaloceanspaces.com%2Flinuxserver%2Flychee%2Flatest%2Fci-status.yml)](https://lsio-ci.ams3.digitaloceanspaces.com/linuxserver/lychee/latest/index.html)
3737

38-
[Lychee](https://lycheeorg.github.io/) is a free photo-management tool, which runs on your server or web-space. Installing is a matter of seconds. Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely.
38+
[Lychee](https://lycheeorg.github.io/) is a free photo-management tool, which runs on your server or web-space. Installing is a matter of seconds. Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely."
39+
40+
### UPGRADE WARNING
41+
42+
Please note that the upgrade process resets ALL password-protected albums. Any albums that were made public with a password will need to be re-secured.
43+
3944

4045
[![lychee](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/lychee-icon.png)](https://lycheeorg.github.io/)
4146

@@ -66,6 +71,10 @@ docker create \
6671
-e PUID=1000 \
6772
-e PGID=1000 \
6873
-e TZ=Europe/London \
74+
-e DB_HOST=<yourdbhost> \
75+
-e DB_USERNAME=<yourdbuser> \
76+
-e DB_PASSWORD=<yourdbpass> \
77+
-e DB_DATABASE=monica \
6978
-p 80:80 \
7079
-v </path/to/appdata/config>:/config \
7180
-v </path/to/pictures>:/pictures \
@@ -89,6 +98,10 @@ services:
8998
- PUID=1000
9099
- PGID=1000
91100
- TZ=Europe/London
101+
- DB_HOST=<yourdbhost>
102+
- DB_USERNAME=<yourdbuser>
103+
- DB_PASSWORD=<yourdbpass>
104+
- DB_DATABASE=monica
92105
volumes:
93106
- </path/to/appdata/config>:/config
94107
- </path/to/pictures>:/pictures
@@ -107,6 +120,10 @@ Container images are configured using parameters passed at runtime (such as thos
107120
| `-e PUID=1000` | for UserID - see below for explanation |
108121
| `-e PGID=1000` | for GroupID - see below for explanation |
109122
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London |
123+
| `-e DB_HOST=<yourdbhost>` | for specifying the database host |
124+
| `-e DB_USERNAME=<yourdbuser>` | for specifying the database user |
125+
| `-e DB_PASSWORD=<yourdbpass>` | for specifying the database password |
126+
| `-e DB_DATABASE=monica` | for specifying the database to be used |
110127
| `-v /config` | Contains all relevant configuration files. |
111128
| `-v /pictures` | Where lychee will store uploaded data. |
112129

@@ -144,8 +161,8 @@ In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as bel
144161
&nbsp;
145162
## Application Setup
146163

147-
Setup mysql/mariadb and account via the webui, accessible at http://SERVERIP:PORT
148-
More info at [lychee](https://lycheeorg.github.io/).
164+
Setup mysql/mariadb and account via the webui, accessible at http://SERVERIP:PORT
165+
More info at [lychee](https://lycheeorg.github.io/).
149166

150167

151168
## Docker Mods
@@ -218,6 +235,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
218235

219236
## Versions
220237

238+
* **10.07.20:** - Upgrade to Lychee v4 and rebased to alpine 3.12.
221239
* **19.12.19:** - Rebasing to alpine 3.11.
222240
* **23.10.19:** - Increase fastcgi timeouts (existing users need to manually update).
223241
* **19.09.19:** - Update project website url.

readme-vars.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
project_name: lychee
55
project_url: "https://lycheeorg.github.io/"
66
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/lychee-icon.png"
7-
project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is a free photo-management tool, which runs on your server or web-space. Installing is a matter of seconds. Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely."
7+
project_blurb: |
8+
[{{ project_name|capitalize }}]({{ project_url }}) is a free photo-management tool, which runs on your server or web-space. Installing is a matter of seconds. Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely."
9+
10+
### UPGRADE WARNING
11+
12+
Please note that the upgrade process resets ALL password-protected albums. Any albums that were made public with a password will need to be re-secured.
813
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
914

1015
# supported architectures
@@ -26,6 +31,10 @@ param_ports:
2631
param_usage_include_env: true
2732
param_env_vars:
2833
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"}
34+
- { env_var: "DB_HOST", env_value: "<yourdbhost>", desc: "for specifying the database host" }
35+
- { env_var: "DB_USERNAME", env_value: "<yourdbuser>", desc: "for specifying the database user" }
36+
- { env_var: "DB_PASSWORD", env_value: "<yourdbpass>", desc: "for specifying the database password" }
37+
- { env_var: "DB_DATABASE", env_value: "monica", desc: "for specifying the database to be used" }
2938

3039
# optional parameters
3140
optional_block_1: false
@@ -34,10 +43,11 @@ optional_block_1_items: ""
3443
# application setup block
3544
app_setup_block_enabled: true
3645
app_setup_block: |
37-
Setup mysql/mariadb and account via the webui, accessible at http://SERVERIP:PORT
38-
More info at [lychee]({{ project_url }}).
46+
Setup mysql/mariadb and account via the webui, accessible at http://SERVERIP:PORT
47+
More info at [lychee]({{ project_url }}).
3948
# changelog
4049
changelogs:
50+
- { date: "10.07.20:", desc: "Upgrade to Lychee v4 and rebased to alpine 3.12." }
4151
- { date: "19.12.19:", desc: "Rebasing to alpine 3.11." }
4252
- { date: "23.10.19:", desc: "Increase fastcgi timeouts (existing users need to manually update)." }
4353
- { date: "19.09.19:", desc: "Update project website url." }

0 commit comments

Comments
 (0)