mirror of
https://github.com/linuxserver/docker-planka.git
synced 2026-02-20 04:13:17 +08:00
Merge pull request #1 from linuxserver/initial-ish
This commit is contained in:
commit
8fc561cd7f
@ -15,6 +15,7 @@ RUN \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
build-base \
|
||||
npm \
|
||||
py3-setuptools \
|
||||
python3-dev && \
|
||||
echo "**** install planka ****" && \
|
||||
if [ -z ${PLANKA_RELEASE+x} ]; then \
|
||||
@ -55,7 +56,8 @@ LABEL maintainer="thespad"
|
||||
|
||||
RUN \
|
||||
apk add --no-cache \
|
||||
nodejs && \
|
||||
nodejs \
|
||||
postgresql16-client && \
|
||||
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version
|
||||
|
||||
COPY --from=buildstage /build/server/ /app
|
||||
|
||||
@ -15,6 +15,7 @@ RUN \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
build-base \
|
||||
npm \
|
||||
py3-setuptools \
|
||||
python3-dev && \
|
||||
echo "**** install planka ****" && \
|
||||
if [ -z ${PLANKA_RELEASE+x} ]; then \
|
||||
@ -55,7 +56,8 @@ LABEL maintainer="thespad"
|
||||
|
||||
RUN \
|
||||
apk add --no-cache \
|
||||
nodejs && \
|
||||
nodejs \
|
||||
postgresql16-client && \
|
||||
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version
|
||||
|
||||
COPY --from=buildstage /build/server/ /app
|
||||
|
||||
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@ -31,8 +31,8 @@ pipeline {
|
||||
PR_DOCKERHUB_IMAGE = 'lspipepr/planka'
|
||||
DIST_IMAGE = 'alpine'
|
||||
MULTIARCH='true'
|
||||
CI='true'
|
||||
CI_WEB='true'
|
||||
CI='false'
|
||||
CI_WEB='false'
|
||||
CI_PORT='1337'
|
||||
CI_SSL='false'
|
||||
CI_DELAY='60'
|
||||
|
||||
@ -37,7 +37,6 @@ Find us at:
|
||||
[](https://hub.docker.com/r/linuxserver/planka)
|
||||
[](https://hub.docker.com/r/linuxserver/planka)
|
||||
[](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-planka/job/main/)
|
||||
[](https://ci-tests.linuxserver.io/linuxserver/planka/latest/index.html)
|
||||
|
||||
[Planka](https://github.com/plankanban/planka/) is an elegant open source project tracking tool.
|
||||
|
||||
@ -91,7 +90,7 @@ services:
|
||||
- PGID=1000
|
||||
- TZ=Etc/UTC
|
||||
- BASE_URL=https://planka.example.com
|
||||
- DATABASE_URL=postgresql://user:password@planka-db/planka
|
||||
- DATABASE_URL=postgresql://user:password@planka-db:5432/planka
|
||||
- SECRET_KEY=notasecretkey
|
||||
- TRUST_PROXY=0
|
||||
volumes:
|
||||
@ -110,7 +109,7 @@ docker run -d \
|
||||
-e PGID=1000 \
|
||||
-e TZ=Etc/UTC \
|
||||
-e BASE_URL=https://planka.example.com \
|
||||
-e DATABASE_URL=postgresql://user:password@planka-db/planka \
|
||||
-e DATABASE_URL=postgresql://user:password@planka-db:5432/planka \
|
||||
-e SECRET_KEY=notasecretkey \
|
||||
-e TRUST_PROXY=0 \
|
||||
-p 1337:1337 \
|
||||
@ -130,7 +129,7 @@ Containers are configured using parameters passed at runtime (such as those abov
|
||||
| `-e PGID=1000` | for GroupID - see below for explanation |
|
||||
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
|
||||
| `-e BASE_URL=https://planka.example.com` | The URL you will use to access planka including protocol, and port if not 80/443. |
|
||||
| `-e DATABASE_URL=postgresql://user:password@planka-db/planka` | Postgres database URL. Special characters must be [url encoded](https://en.wikipedia.org/wiki/Percent-encoding). |
|
||||
| `-e DATABASE_URL=postgresql://user:password@planka-db:5432/planka` | Postgres database URL. Special characters must be [url encoded](https://en.wikipedia.org/wiki/Percent-encoding). |
|
||||
| `-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. |
|
||||
| `-v /config` | Local path for planka config files. |
|
||||
|
||||
@ -19,8 +19,8 @@ repo_vars:
|
||||
- PR_DOCKERHUB_IMAGE = 'lspipepr/planka'
|
||||
- DIST_IMAGE = 'alpine'
|
||||
- MULTIARCH='true'
|
||||
- CI='true'
|
||||
- CI_WEB='true'
|
||||
- CI='false'
|
||||
- CI_WEB='false'
|
||||
- CI_PORT='1337'
|
||||
- CI_SSL='false'
|
||||
- CI_DELAY='60'
|
||||
|
||||
@ -18,7 +18,7 @@ param_container_name: "{{ project_name }}"
|
||||
param_usage_include_env: true
|
||||
param_env_vars:
|
||||
- { env_var: "BASE_URL", env_value: "https://planka.example.com", desc: "The URL you will use to access planka including protocol, and port if not 80/443." }
|
||||
- { env_var: "DATABASE_URL", env_value: "postgresql://user:password@planka-db/planka", desc: "Postgres database URL. Special characters must be [url encoded](https://en.wikipedia.org/wiki/Percent-encoding)." }
|
||||
- { env_var: "DATABASE_URL", env_value: "postgresql://user:password@planka-db:5432/planka", desc: "Postgres database URL. Special characters must be [url encoded](https://en.wikipedia.org/wiki/Percent-encoding)." }
|
||||
- { 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." }
|
||||
param_usage_include_vols: true
|
||||
|
||||
@ -3,6 +3,28 @@
|
||||
|
||||
cd /app || exit 1
|
||||
|
||||
if [[ -n ${DATABASE_URL} ]]; then
|
||||
DB_HOST=$(echo "${DATABASE_URL}" | awk -F '@' '{print $NF}' | awk -F ':' '{print $1}' | awk -F '/' '{print $1}')
|
||||
DB_PORT=$(echo "${DATABASE_URL}" | awk -F '@' '{print $NF}' | awk -F ':' '{print $2}' | awk -F '/' '{print $1}')
|
||||
if [[ ! ${DB_PORT} =~ [0-9]+ ]]; then DB_PORT="5432"; fi
|
||||
echo "Waiting for DB ${DB_HOST} to become available on port ${DB_PORT}..."
|
||||
END=$((SECONDS + 30))
|
||||
while [[ ${SECONDS} -lt ${END} ]] && [[ -n "${DB_HOST+x}" ]]; do
|
||||
if pg_isready -h "${DB_HOST}" -p "${DB_PORT}" -q; then
|
||||
if [[ ! -f /dbwait.lock ]]; then
|
||||
sleep 5
|
||||
fi
|
||||
touch /dbwait.lock
|
||||
break
|
||||
else
|
||||
sleep 1
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "No database configured, sleeping..."
|
||||
sleep infinity
|
||||
fi
|
||||
|
||||
s6-setuidgid abc node db/init.js
|
||||
|
||||
symlinks=(
|
||||
@ -26,3 +48,4 @@ shopt -u globstar dotglob
|
||||
# permissions
|
||||
lsiown -R abc:abc \
|
||||
/config
|
||||
|
||||
|
||||
@ -5,4 +5,4 @@ export NODE_ENV=production
|
||||
|
||||
HOME=/config exec \
|
||||
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 1337" \
|
||||
cd /app s6-setuidgid abc node app.js --prod "$@"
|
||||
cd /app s6-setuidgid abc node app.js --prod
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user