Merge pull request #12 from linuxserver/v2

Updates to support v2 release
This commit is contained in:
Adam 2026-02-13 13:07:49 +00:00 committed by GitHub
commit cfd6e95a72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 82 additions and 57 deletions

View File

@ -29,8 +29,8 @@ jobs:
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> External trigger running off of main branch. To disable this trigger, add \`planka_main\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
EXT_RELEASE=$(echo v1.26.3)
echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY
EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/plankanban/planka/releases/latest" | jq -r '. | .tag_name')
echo "Type is \`github_stable\`" >> $GITHUB_STEP_SUMMARY
if grep -q "^planka_main_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` matches current external release; skipping trigger." >> $GITHUB_STEP_SUMMARY

View File

@ -1,22 +1,21 @@
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine:3.21 AS buildstage
FROM ghcr.io/linuxserver/baseimage-alpine:3.23 AS buildstage
# set version label
ARG PLANKA_RELEASE
RUN \
echo "**** install packages ****" && \
apk add --no-cache \
apk add --no-cache --virtual=build-dependencies \
build-base \
giflib \
libgsf \
nodejs \
vips && \
apk add --no-cache --virtual=build-dependencies \
build-base \
npm \
py3-setuptools \
python3-dev && \
python3-dev \
vips && \
echo "**** install planka ****" && \
if [ -z ${PLANKA_RELEASE+x} ]; then \
PLANKA_RELEASE=$(curl -s https://api.github.com/repos/plankanban/planka/releases/latest \
@ -30,12 +29,9 @@ RUN \
/tmp/planka.tar.gz -C \
/build --strip-components=1 && \
cd /build/server && \
npm install pnpm@9 --global && \
pnpm import && \
pnpm install --prod && \
npm install --omit=dev && \
cd /build/client && \
pnpm import && \
pnpm install --prod && \
npm install --omit=dev && \
DISABLE_ESLINT_PLUGIN=true npm run build && \
echo "**** cleanup ****" && \
apk del --purge \
@ -46,7 +42,7 @@ RUN \
$HOME/.npm \
/tmp/*
FROM ghcr.io/linuxserver/baseimage-alpine:3.21
FROM ghcr.io/linuxserver/baseimage-alpine:3.23
ARG BUILD_DATE
ARG VERSION
@ -56,19 +52,21 @@ LABEL maintainer="thespad"
COPY --from=buildstage /build/server/ /app
COPY --from=buildstage /build/server/.env.sample /app/.env
COPY --from=buildstage /build/client/build /app/public/
COPY --from=buildstage /build/client/build/index.html /app/views/index.ejs
COPY --from=buildstage /build/client/dist /app/public/
COPY --from=buildstage /build/client/dist/index.html /app/views
RUN \
apk add --no-cache \
nodejs \
npm \
postgresql16-client && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** create symlinks ****" && \
/bin/bash -c \
'dst=(user-avatars project-background-images attachments logs); \
src=(public/user-avatars public/project-background-images private/attachments logs); \
for i in "${!src[@]}"; do rm -rf /app/"${src[i]}" && ln -s /config/"${dst[i]}" /app/"${src[i]}"; done'
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** create symlinks ****" && \
mkdir -p /app/data/private/attachments && \
/bin/bash -c \
'dst=(favicons images attachments logs); \
src=(public/favicons data/protected data/private/attachments logs); \
for i in "${!src[@]}"; do rm -rf /app/"${src[i]}" && ln -s /config/"${dst[i]}" /app/"${src[i]}"; done'
# copy local files
COPY root/ /

View File

@ -1,22 +1,21 @@
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.21 AS buildstage
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.23 AS buildstage
# set version label
ARG PLANKA_RELEASE
RUN \
echo "**** install packages ****" && \
apk add --no-cache \
apk add --no-cache --virtual=build-dependencies \
build-base \
giflib \
libgsf \
nodejs \
vips && \
apk add --no-cache --virtual=build-dependencies \
build-base \
npm \
py3-setuptools \
python3-dev && \
python3-dev \
vips && \
echo "**** install planka ****" && \
if [ -z ${PLANKA_RELEASE+x} ]; then \
PLANKA_RELEASE=$(curl -s https://api.github.com/repos/plankanban/planka/releases/latest \
@ -30,12 +29,9 @@ RUN \
/tmp/planka.tar.gz -C \
/build --strip-components=1 && \
cd /build/server && \
npm install pnpm@9 --global && \
pnpm import && \
pnpm install --prod && \
npm install --omit=dev && \
cd /build/client && \
pnpm import && \
pnpm install --prod && \
npm install --omit=dev && \
DISABLE_ESLINT_PLUGIN=true npm run build && \
echo "**** cleanup ****" && \
apk del --purge \
@ -46,7 +42,7 @@ RUN \
$HOME/.npm \
/tmp/*
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.21
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.23
ARG BUILD_DATE
ARG VERSION
@ -56,18 +52,20 @@ LABEL maintainer="thespad"
COPY --from=buildstage /build/server/ /app
COPY --from=buildstage /build/server/.env.sample /app/.env
COPY --from=buildstage /build/client/build /app/public/
COPY --from=buildstage /build/client/build/index.html /app/views/index.ejs
COPY --from=buildstage /build/client/dist /app/public/
COPY --from=buildstage /build/client/dist/index.html /app/views
RUN \
apk add --no-cache \
nodejs \
npm \
postgresql16-client && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** create symlinks ****" && \
mkdir -p /app/data/private/attachments && \
/bin/bash -c \
'dst=(user-avatars project-background-images attachments logs); \
src=(public/user-avatars public/project-background-images private/attachments logs); \
'dst=(favicons images attachments logs); \
src=(public/favicons data/protected data/private/attachments logs); \
for i in "${!src[@]}"; do rm -rf /app/"${src[i]}" && ln -s /config/"${dst[i]}" /app/"${src[i]}"; done'
# copy local files

29
Jenkinsfile vendored
View File

@ -145,16 +145,23 @@ pipeline {
/* ########################
External Release Tagging
######################## */
// If this is a custom command to determine version use that command
stage("Set tag custom bash"){
steps{
script{
env.EXT_RELEASE = sh(
script: ''' echo v1.26.3 ''',
returnStdout: true).trim()
env.RELEASE_LINK = 'custom_command'
}
}
// If this is a stable github release use the latest endpoint from github to determine the ext tag
stage("Set ENV github_stable"){
steps{
script{
env.EXT_RELEASE = sh(
script: '''curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''',
returnStdout: true).trim()
}
}
}
// If this is a stable or devel github release generate the link for the build message
stage("Set ENV github_link"){
steps{
script{
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE
}
}
}
// Sanitize the release tag and strip illegal docker or github characters
stage("Sanitize tag"){
@ -1023,7 +1030,7 @@ pipeline {
"type": "commit",\
"tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}'
echo "Pushing New release for Tag"
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. |.body' > releasebody.json
jq -n \
--arg tag_name "$META_TAG" \
--arg target_commitish "main" \

View File

@ -104,7 +104,8 @@ services:
- DEFAULT_ADMIN_PASSWORD=demo
- "DEFAULT_ADMIN_NAME=Demo User"
- SECRET_KEY=notasecretkey
- TRUST_PROXY=0
- TRUST_PROXY=false
- DEFAULT_LANGUAGE=en-US #optional
volumes:
- /path/to/planka/data:/config
ports:
@ -127,7 +128,8 @@ docker run -d \
-e DEFAULT_ADMIN_PASSWORD=demo \
-e DEFAULT_ADMIN_NAME="Demo User" \
-e SECRET_KEY=notasecretkey \
-e TRUST_PROXY=0 \
-e TRUST_PROXY=false \
-e DEFAULT_LANGUAGE=en-US `#optional` \
-p 1337:1337 \
-v /path/to/planka/data:/config \
--restart unless-stopped \
@ -151,7 +153,8 @@ Containers are configured using parameters passed at runtime (such as those abov
| `-e DEFAULT_ADMIN_PASSWORD=demo` | Password for default user. |
| `-e DEFAULT_ADMIN_NAME=Demo User` | Display name for default user. |
| `-e SECRET_KEY=notasecretkey` | Session encryption key, recommended 32-64 character alphanumeric. |
| `-e TRUST_PROXY=0` | Set to `1` to trust upstream proxies if reverse proxying. |
| `-e TRUST_PROXY=false` | Set to `true` to trust upstream proxies if reverse proxying. |
| `-e DEFAULT_LANGUAGE=en-US` | This sets the default language for sending notifications per user (if a user hasn't selected a language) and per board. |
| `-v /config` | Local path for planka config files. |
| `--read-only=true` | Run container with a read-only filesystem. Please [read the docs](https://docs.linuxserver.io/misc/read-only/). |
| `--user=1000:1000` | Run container with a non-root user. Please [read the docs](https://docs.linuxserver.io/misc/non-root/). |
@ -318,6 +321,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **13.02.26:** - Rebase to Alpine 3.23. Updates for v2. Users should update `TRUST_PROXY` to use `true`/`false` instead of `1`/`0`.
* **12.01.25:** - Rebase to Alpine 3.21.
* **18.09.24:** - Update default user docs.
* **12.09.24:** - Initial Release.

View File

@ -2,8 +2,7 @@
# jenkins variables
project_name: docker-planka
external_type: na
custom_version_command: "echo v1.26.3"
external_type: github_stable
release_type: stable
release_tag: latest
ls_branch: main

View File

@ -23,7 +23,10 @@ param_env_vars:
- {env_var: "DEFAULT_ADMIN_PASSWORD", env_value: "demo", desc: "Password for default user."}
- {env_var: "DEFAULT_ADMIN_NAME", env_value: "Demo User", desc: "Display name for default user."}
- {env_var: "SECRET_KEY", env_value: "notasecretkey", desc: "Session encryption key, recommended 32-64 character alphanumeric."}
- {env_var: "TRUST_PROXY", env_value: "0", desc: "Set to `1` to trust upstream proxies if reverse proxying."}
- {env_var: "TRUST_PROXY", env_value: "false", desc: "Set to `true` to trust upstream proxies if reverse proxying."}
opt_param_usage_include_env: true
opt_param_env_vars:
- {env_var: "DEFAULT_LANGUAGE", env_value: "en-US", desc: "This sets the default language for sending notifications per user (if a user hasn't selected a language) and per board."}
param_usage_include_vols: true
param_volumes:
- {vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/data", desc: "Local path for planka config files."}
@ -92,6 +95,7 @@ init_diagram: |
"planka:latest" <- Base Images
# changelog
changelogs:
- {date: "13.02.26:", desc: "Rebase to Alpine 3.23. Updates for v2. Users should update `TRUST_PROXY` to use `true`/`false` instead of `1`/`0`."}
- {date: "12.01.25:", desc: "Rebase to Alpine 3.21."}
- {date: "18.09.24:", desc: "Update default user docs."}
- {date: "12.09.24:", desc: "Initial Release."}

View File

@ -3,7 +3,7 @@
cd /app || exit 1
mkdir -p /config/logs
mkdir -p /config/{favicons,images,attachments,logs}
if [[ -n ${DATABASE_URL} ]]; then
DB_HOST=$(awk -F '@|:|/' '{print $6}' <<<"${DATABASE_URL}")
@ -28,7 +28,22 @@ else
sleep infinity
fi
echo "Migrating database..."
# v2 migration nonsense
if [[ ! -f "/config/v2" ]] && [[ -f "/config/logs/planka.log" ]]; then
if [[ -d /config/project-background-images ]]; then
mv /config/project-background-images /config/background-images
cp -a /config/background-images /config/images
rm -rf /config/background-images
fi
if [[ -d /config/user-avatars ]]; then
cp -a /config/user-avatars /config/images
rm -rf /config/user-avatars
fi
TZ=UTC s6-setuidgid abc npm run db:upgrade
touch "/config/v2"
fi
echo "Running database migrations..."
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
TZ=UTC s6-setuidgid abc node db/init.js