diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index dd06922..1723cf5 100755 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -22,8 +22,9 @@ jobs: if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then echo "**** Can't retrieve external version, exiting ****" FAILURE_REASON="Can't retrieve external version for lychee branch master" + GHA_TRIGGER_URL="https://github.com/linuxserver/docker-lychee/actions/runs/${{ github.run_id }}" curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680, - "description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}], + "description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}], "username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }} exit 1 fi diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 8a8d44c..1259859 100755 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -8,6 +8,6 @@ jobs: steps: - uses: actions/first-interaction@v1 with: - issue-message: 'Thanks for opening your first issue here! Be sure to follow the [issue template](https://github.com/linuxserver/docker-lychee/blob/master/.github/ISSUE_TEMPLATE.md)!' + issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-lychee/blob/master/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-lychee/blob/master/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!' pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-lychee/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!' repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/package_trigger_scheduler.yml b/.github/workflows/package_trigger_scheduler.yml index 67027d3..989c907 100755 --- a/.github/workflows/package_trigger_scheduler.yml +++ b/.github/workflows/package_trigger_scheduler.yml @@ -2,7 +2,7 @@ name: Package Trigger Scheduler on: schedule: - - cron: '13 7 * * 0' + - cron: '43 8 * * 5' workflow_dispatch: jobs: diff --git a/Dockerfile b/Dockerfile index 266182c..e910756 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.12 +FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.13 # set version label ARG BUILD_DATE @@ -10,15 +10,16 @@ LABEL maintainer="hackerman" RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ - git \ - composer && \ + git && \ echo "**** install runtime packages ****" && \ apk add --no-cache \ + composer \ curl \ exiftool \ ffmpeg \ gd \ imagemagick \ + php7-ctype \ php7-dom \ php7-exif \ php7-gd \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 9ed2ca8..4631bc9 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.12 +FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.13 # set version label ARG BUILD_DATE @@ -10,15 +10,16 @@ LABEL maintainer="hackerman" RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ - git \ - composer && \ + git && \ echo "**** install runtime packages ****" && \ apk add --no-cache \ + composer \ curl \ exiftool \ ffmpeg \ gd \ imagemagick \ + php7-ctype \ php7-dom \ php7-exif \ php7-gd \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index d150802..9be66a8 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.12 +FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.13 # set version label ARG BUILD_DATE @@ -10,15 +10,16 @@ LABEL maintainer="hackerman" RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ - git \ - composer && \ + git && \ echo "**** install runtime packages ****" && \ apk add --no-cache \ + composer \ curl \ exiftool \ ffmpeg \ gd \ imagemagick \ + php7-ctype \ php7-dom \ php7-exif \ php7-gd \ diff --git a/Jenkinsfile b/Jenkinsfile index 4114087..3a0e315 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -265,13 +265,30 @@ pipeline { fi mkdir -p ${TEMPDIR}/gitbook git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation - if [[ "${BRANCH_NAME}" == "master" ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then + if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then cp ${TEMPDIR}/docker-${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/ cd ${TEMPDIR}/gitbook/docker-documentation/ git add images/docker-${CONTAINER_NAME}.md git commit -m 'Bot Updating Documentation' git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all fi + mkdir -p ${TEMPDIR}/unraid + git clone https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates + git clone https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates + if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-icon.png ]]; then + sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-icon.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/${CONTAINER_NAME}.xml + fi + if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml) || ("$(md5sum ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/${CONTAINER_NAME}.xml | awk '{ print $1 }')") ]]; then + if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then + echo "Image is on the ignore list, skipping Unraid template upload" + else + cp ${TEMPDIR}/docker-${CONTAINER_NAME}/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/ + cd ${TEMPDIR}/unraid/templates/ + git add unraid/${CONTAINER_NAME}.xml + git commit -m 'Bot Updating Unraid Template' + git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git --all + fi + fi rm -Rf ${TEMPDIR}''' script{ env.FILES_UPDATED = sh( diff --git a/README.md b/README.md index 58a9c69..23369f0 100644 --- a/README.md +++ b/README.md @@ -71,26 +71,43 @@ Here are some example snippets to help you get started creating a container. Compatible with docker-compose v2 schemas. ```yaml ---- -version: "2.1" +version: "3" services: - lychee: - image: ghcr.io/linuxserver/lychee - container_name: lychee - environment: - - PUID=1000 - - PGID=1000 - - TZ=Europe/London - - DB_HOST= - - DB_USERNAME= - - DB_PASSWORD= - - DB_DATABASE=monica + mariadb: + image: ghcr.io/linuxserver/mariadb:latest + container_name: lychee_mariadb + restart: always volumes: - - :/config - - :/pictures + - /path/to/mariadb/data:/config + environment: + - MYSQL_ROOT_PASSWORD=rootpassword + - MYSQL_DATABASE=lychee + - MYSQL_USER=lychee + - MYSQL_PASSWORD=dbpassword + - PGID=1000 + - PUID=1000 + - TZ=Europe/London + lychee: + image: ghcr.io/linuxserver/lychee:latest + container_name: lychee + restart: always + depends_on: + - mariadb + volumes: + - /path/to/config:/config + - /path/to/pictures:/pictures + environment: + - DB_HOST=mariadb + - DB_USER=lychee + - DB_PASS=dbpassword + - DB_NAME=lychee + - DB_PORT=3306 + - PGID=1000 + - PUID=1000 + - TZ=Europe/London ports: - 80:80 - restart: unless-stopped + ``` ### docker cli @@ -101,13 +118,13 @@ docker run -d \ -e PUID=1000 \ -e PGID=1000 \ -e TZ=Europe/London \ - -e DB_HOST= \ - -e DB_USERNAME= \ - -e DB_PASSWORD= \ - -e DB_DATABASE=monica \ + -e DB_HOST=mariadb \ + -e DB_USERNAME=lychee \ + -e DB_PASSWORD=dbpassword \ + -e DB_DATABASE=lychee \ -p 80:80 \ - -v :/config \ - -v :/pictures \ + -v /path/to/config:/config \ + -v /path/to/pictures:/pictures \ --restart unless-stopped \ ghcr.io/linuxserver/lychee ``` @@ -123,10 +140,10 @@ Container images are configured using parameters passed at runtime (such as thos | `-e PUID=1000` | for UserID - see below for explanation | | `-e PGID=1000` | for GroupID - see below for explanation | | `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London | -| `-e DB_HOST=` | for specifying the database host | -| `-e DB_USERNAME=` | for specifying the database user | -| `-e DB_PASSWORD=` | for specifying the database password | -| `-e DB_DATABASE=monica` | for specifying the database to be used | +| `-e DB_HOST=mariadb` | for specifying the database host | +| `-e DB_USERNAME=lychee` | for specifying the database user | +| `-e DB_PASSWORD=dbpassword` | for specifying the database password | +| `-e DB_DATABASE=lychee` | for specifying the database to be used | | `-v /config` | Contains all relevant configuration files. | | `-v /pictures` | Where lychee will store uploaded data. | @@ -239,6 +256,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **15.01.21:** - Rebase to alpine 3.13, add php7-ctype. * **10.07.20:** - Upgrade to Lychee v4 and rebased to alpine 3.12. * **19.12.19:** - Rebasing to alpine 3.11. * **23.10.19:** - Increase fastcgi timeouts (existing users need to manually update). diff --git a/readme-vars.yml b/readme-vars.yml index 1ccb5e7..30c616d 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -23,30 +23,70 @@ common_param_env_vars_enabled: true param_container_name: "{{ project_name }}" param_usage_include_vols: true param_volumes: - - { vol_path: "/config", vol_host_path: "", desc: "Contains all relevant configuration files." } - - { vol_path: "/pictures", vol_host_path: "", desc: "Where lychee will store uploaded data." } + - { vol_path: "/config", vol_host_path: "/path/to/config", desc: "Contains all relevant configuration files." } + - { vol_path: "/pictures", vol_host_path: "/path/to/pictures", desc: "Where lychee will store uploaded data." } param_usage_include_ports: true param_ports: - { external_port: "80", internal_port: "80", port_desc: "http gui" } param_usage_include_env: true param_env_vars: - { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"} - - { env_var: "DB_HOST", env_value: "", desc: "for specifying the database host" } - - { env_var: "DB_USERNAME", env_value: "", desc: "for specifying the database user" } - - { env_var: "DB_PASSWORD", env_value: "", desc: "for specifying the database password" } - - { env_var: "DB_DATABASE", env_value: "monica", desc: "for specifying the database to be used" } + - { env_var: "DB_HOST", env_value: "mariadb", desc: "for specifying the database host" } + - { env_var: "DB_USERNAME", env_value: "lychee", desc: "for specifying the database user" } + - { env_var: "DB_PASSWORD", env_value: "dbpassword", desc: "for specifying the database password" } + - { env_var: "DB_DATABASE", env_value: "lychee", desc: "for specifying the database to be used" } # optional parameters optional_block_1: false optional_block_1_items: "" +custom_compose: | + version: "3" + services: + mariadb: + image: ghcr.io/linuxserver/mariadb:latest + container_name: lychee_mariadb + restart: always + volumes: + - /path/to/mariadb/data:/config + environment: + - MYSQL_ROOT_PASSWORD=rootpassword + - MYSQL_DATABASE=lychee + - MYSQL_USER=lychee + - MYSQL_PASSWORD=dbpassword + - PGID=1000 + - PUID=1000 + - TZ=Europe/London + lychee: + image: ghcr.io/linuxserver/lychee:latest + container_name: lychee + restart: always + depends_on: + - mariadb + volumes: + - /path/to/config:/config + - /path/to/pictures:/pictures + environment: + - DB_HOST=mariadb + - DB_USER=lychee + - DB_PASS=dbpassword + - DB_NAME=lychee + - DB_PORT=3306 + - PGID=1000 + - PUID=1000 + - TZ=Europe/London + ports: + - 80:80 + # application setup block app_setup_block_enabled: true app_setup_block: | Setup mysql/mariadb and account via the webui, accessible at http://SERVERIP:PORT More info at [lychee]({{ project_url }}). + # changelog changelogs: + - { date: "15.01.21:", desc: "Rebase to alpine 3.13, add php7-ctype." } - { date: "10.07.20:", desc: "Upgrade to Lychee v4 and rebased to alpine 3.12." } - { date: "19.12.19:", desc: "Rebasing to alpine 3.11." } - { date: "23.10.19:", desc: "Increase fastcgi timeouts (existing users need to manually update)." }