Compare commits

...

14 Commits

Author SHA1 Message Date
Robert Kaussow 310c2785ad move container library setup to base image (#40)
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
Co-committed-by: Robert Kaussow <xoxys@rknet.org>
2021-10-10 15:26:07 +02:00
Renovator Bot fe198d2550 chore(docker): update thegeeklab/nginx:latest docker digest to cf19fb8
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-10-09 20:36:00 +00:00
Robert Kaussow 5d918aec5f
feat: add container library
continuous-integration/drone/push Build is passing Details
2021-10-09 22:02:53 +02:00
Renovator Bot 2431266666 chore(docker): update thegeeklab/nginx:latest docker digest to bc82863
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-09-25 00:01:09 +00:00
Renovator Bot d6c9b5a291 chore(docker): update thegeeklab/nginx:latest docker digest to f560019
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-09-22 10:01:05 +00:00
Robert Kaussow 293d0bb371
improve changelog template
continuous-integration/drone/push Build is passing Details
2021-09-22 11:45:40 +02:00
Renovator Bot cde9f3050d chore(docker): update thegeeklab/nginx:latest docker digest to 4617fbd
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-09-22 08:01:04 +00:00
Robert Kaussow b4f7969d7f
improve drone-matrix template
continuous-integration/drone/push Build is passing Details
2021-09-22 09:22:34 +02:00
Renovator Bot 47650fea87 chore(docker): update thegeeklab/nginx:latest docker digest to 9de3f26
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-09-19 20:01:10 +00:00
Robert Kaussow d44c61a1ab
ci: switch to drone-matrix plugin
continuous-integration/drone/push Build is passing Details
2021-09-19 21:48:19 +02:00
Renovator Bot 289e26b7f0 chore(docker): update thegeeklab/nginx:latest docker digest to fa27027
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-08-27 22:01:05 +00:00
Renovator Bot d591e5c5a0 chore(docker): update thegeeklab/nginx:latest docker digest to d9e84d9
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-08-27 20:01:03 +00:00
Renovator Bot 114fa6399a chore(docker): update thegeeklab/nginx:latest docker digest to fd5f1b4
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-08-24 14:07:51 +00:00
Renovator Bot 0028ca8da3 chore(deps): update thegeeklab/nginx:latest docker digest
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-07-31 21:46:48 +00:00
4 changed files with 174 additions and 168 deletions

View File

@ -6,13 +6,9 @@
{{ range .CommitGroups -}}
### {{ .Title }}
{{ $subjects := list }}
{{ range .Commits -}}
{{ if not (has .Subject $subjects) -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ $subjects = append $subjects .Subject -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ (regexReplaceAll "(Co-\\w*-by.*)" .Subject "") | trim }}
{{ end }}
{{- end }}
{{- end -}}
{{- if .NoteGroups -}}

View File

@ -7,16 +7,16 @@ platform:
arch: amd64
steps:
- name: markdownlint
image: thegeeklab/markdownlint-cli
commands:
- markdownlint 'README.md'
- name: markdownlint
image: thegeeklab/markdownlint-cli
commands:
- markdownlint 'README.md'
trigger:
ref:
- refs/heads/main
- refs/pull/**
- refs/tags/**
- refs/heads/main
- refs/pull/**
- refs/tags/**
---
kind: pipeline
@ -27,113 +27,113 @@ platform:
arch: amd64
steps:
- name: dryrun
image: thegeeklab/drone-docker-buildx:20
settings:
build_args:
- BUILD_VERSION=${DRONE_TAG%-*}
dockerfile: Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/pull/**
- name: dryrun
image: thegeeklab/drone-docker-buildx:20
settings:
build_args:
- BUILD_VERSION=${DRONE_TAG%-*}
dockerfile: Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/pull/**
- name: tags
image: thegeeklab/docker-autotag
environment:
DOCKER_AUTOTAG_FORCE_LATEST: True
DOCKER_AUTOTAG_IGNORE_PRERELEASE: True
DOCKER_AUTOTAG_OUTPUT_FILE: .tags
DOCKER_AUTOTAG_VERSION: ${DRONE_TAG}
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- dryrun
- name: tags
image: thegeeklab/docker-autotag
environment:
DOCKER_AUTOTAG_FORCE_LATEST: True
DOCKER_AUTOTAG_IGNORE_PRERELEASE: True
DOCKER_AUTOTAG_OUTPUT_FILE: .tags
DOCKER_AUTOTAG_VERSION: ${DRONE_TAG}
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- dryrun
- name: changelog-generate
image: thegeeklab/git-chglog
commands:
- git fetch -tq
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
depends_on:
- tags
- name: changelog-generate
image: thegeeklab/git-chglog
commands:
- git fetch -tq
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
depends_on:
- tags
- name: changelog-format
image: thegeeklab/alpine-tools
commands:
- prettier CHANGELOG.md
- prettier -w CHANGELOG.md
depends_on:
- changelog-generate
- name: changelog-format
image: thegeeklab/alpine-tools
commands:
- prettier CHANGELOG.md
- prettier -w CHANGELOG.md
depends_on:
- changelog-generate
- name: publish-dockerhub
image: thegeeklab/drone-docker-buildx:20
settings:
build_args:
- BUILD_VERSION=${DRONE_TAG%-*}
dockerfile: Dockerfile
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- changelog-format
- name: publish-dockerhub
image: thegeeklab/drone-docker-buildx:20
settings:
build_args:
- BUILD_VERSION=${DRONE_TAG%-*}
dockerfile: Dockerfile
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- changelog-format
- name: publish-quay
image: thegeeklab/drone-docker-buildx:20
settings:
build_args:
- BUILD_VERSION=${DRONE_TAG%-*}
dockerfile: Dockerfile
password:
from_secret: quay_password
registry: quay.io
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: quay_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- changelog-format
- name: publish-quay
image: thegeeklab/drone-docker-buildx:20
settings:
build_args:
- BUILD_VERSION=${DRONE_TAG%-*}
dockerfile: Dockerfile
password:
from_secret: quay_password
registry: quay.io
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: quay_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- changelog-format
- name: publish-gitea
image: plugins/gitea-release
settings:
api_key:
from_secret: gitea_token
base_url: https://gitea.rknet.org
note: CHANGELOG.md
overwrite: true
title: ${DRONE_TAG}
when:
ref:
- refs/tags/**
depends_on:
- publish-dockerhub
- publish-quay
- name: publish-gitea
image: plugins/gitea-release
settings:
api_key:
from_secret: gitea_token
base_url: https://gitea.rknet.org
note: CHANGELOG.md
overwrite: true
title: ${DRONE_TAG}
when:
ref:
- refs/tags/**
depends_on:
- publish-dockerhub
- publish-quay
trigger:
ref:
- refs/heads/main
- refs/pull/**
- refs/tags/**
- refs/heads/main
- refs/pull/**
- refs/tags/**
depends_on:
- test
- test
---
kind: pipeline
@ -144,63 +144,63 @@ platform:
arch: amd64
steps:
- name: pushrm-dockerhub
pull: always
image: chko/docker-pushrm:1
environment:
DOCKER_PASS:
from_secret: docker_password
DOCKER_USER:
from_secret: docker_username
PUSHRM_FILE: README.md
PUSHRM_SHORT: Custom image for FreshRSS feed aggregator
PUSHRM_TARGET: thegeeklab/${DRONE_REPO_NAME}
when:
status:
- success
- name: pushrm-dockerhub
pull: always
image: chko/docker-pushrm:1
environment:
DOCKER_PASS:
from_secret: docker_password
DOCKER_USER:
from_secret: docker_username
PUSHRM_FILE: README.md
PUSHRM_SHORT: Custom image for FreshRSS feed aggregator
PUSHRM_TARGET: thegeeklab/${DRONE_REPO_NAME}
when:
status:
- success
- name: pushrm-quay
pull: always
image: chko/docker-pushrm:1
environment:
APIKEY__QUAY_IO:
from_secret: quay_token
PUSHRM_FILE: README.md
PUSHRM_TARGET: quay.io/thegeeklab/${DRONE_REPO_NAME}
when:
status:
- success
- name: pushrm-quay
pull: always
image: chko/docker-pushrm:1
environment:
APIKEY__QUAY_IO:
from_secret: quay_token
PUSHRM_FILE: README.md
PUSHRM_TARGET: quay.io/thegeeklab/${DRONE_REPO_NAME}
when:
status:
- success
- name: matrix
image: plugins/matrix
settings:
homeserver:
from_secret: matrix_homeserver
password:
from_secret: matrix_password
roomid:
from_secret: matrix_roomid
template: "Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}"
username:
from_secret: matrix_username
when:
status:
- success
- failure
- name: matrix
image: thegeeklab/drone-matrix
settings:
homeserver:
from_secret: matrix_homeserver
password:
from_secret: matrix_password
roomid:
from_secret: matrix_roomid
template: "Status: **{{ build.Status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.Link }}){{#if build.Branch}} ({{ build.Branch }}){{/if}} by {{ commit.Author }}<br/> Message: {{ commit.Message.Title }}"
username:
from_secret: matrix_username
when:
status:
- success
- failure
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/heads/main
- refs/tags/**
status:
- success
- failure
- success
- failure
depends_on:
- build-container
- build-container
---
kind: signature
hmac: b4bc5725b81af54f315d93f84f7c1097d02f5258277fc09e87d42029ed9539a0
hmac: 42ec3e3517c9b8207612b0a3d89fd34d02290babd557063ac941d7b94edc65d5
...

View File

@ -1,4 +1,4 @@
FROM thegeeklab/nginx:latest@sha256:b87952e51d7e29439a23affa33301b82aede3c4c4a59a3ac1273b47f1fba6195
FROM thegeeklab/nginx:latest@sha256:cf19fb8a1e1face75341cf5d11d6434bb595cb2569ae03100b3cbeb813ce478d
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
@ -8,6 +8,7 @@ LABEL org.opencontainers.image.source="https://gitea.rknet.org/docker/freshrss"
LABEL org.opencontainers.image.documentation="https://gitea.rknet.org/docker/freshrss"
ARG BUILD_VERSION
# renovate: datasource=github-releases depName=FreshRSS/FreshRSS
ENV FRESHRSS_VERSION="${BUILD_VERSION:-1.18.1}"

View File

@ -1,5 +1,8 @@
#!/usr/bin/env sh
# shellcheck disable=SC1091
. /usr/local/lib/log.sh
/usr/local/bin/gomplate -o /etc/php7/php.ini -f /etc/templates/php.ini.tmpl
/usr/local/bin/gomplate -o /var/www/app/data/config.php -f /etc/templates/config.php.tmpl
/usr/local/bin/gomplate -o /var/www/app/constants.local.php -f /etc/templates/constants.local.php.tmpl
@ -8,46 +11,52 @@ if [ -n "${FRESHRSS_POSTGRES_SSL_ROOTCERT}" ] && [ ! -f "/var/www/.postgresql/ro
ln -s "${FRESHRSS_POSTGRES_SSL_ROOTCERT}" /var/www/.postgresql/root.crt
fi
printf "\nPrepare FreshRSS...\n"
log_info "Prepare FreshRSS"
/usr/bin/php -f ./cli/prepare.php >/dev/null 2>&1
/usr/bin/php -f ./cli/do-install.php -- --api_enabled \
ERROR=$(/usr/bin/php -f ./cli/do-install.php -- --api_enabled \
--base_url "${FRESHRSS_BASE_URL:-http://localhost/}" \
--db-base "${FRESHRSS_DB_BASE}" \
--db-host "${FRESHRSS_DB_HOST:-localhost}" \
--db-password "${FRESHRSS_DB_PASSWORD}" \
--db-type "${FRESHRSS_DB_TYPE:-sqlite}" \
--db-user "${FRESHRSS_DB_USER}" \
--default_user "${FRESHRSS_DEFAULT_USER:-_}" \
--language "${FRESHRSS_LANGUAGE:-en}" >/dev/null 2>&1
--default_user "${FRESHRSS_DEFAULT_USER:-admin}" \
--language "${FRESHRSS_LANGUAGE:-en}" \
2>&1)
EXITCODE=$?
if [ $EXITCODE -eq 3 ]; then
printf 'FreshRSS already installed, no change performed\n'
log_info "FreshRSS already installed, skipped"
elif [ $EXITCODE -eq 0 ]; then
printf 'FreshRSS successfully installed\n'
log_info "FreshRSS successfully installed"
else
printf 'FreshRSS error during installation\n'
log_error "FreshRSS error during installation: ${ERROR}"
exit $EXITCODE
fi
if [ "${FRESHRSS_DEFAULT_USER}" ]; then
printf "\nEnsure default user exists...\n"
/usr/bin/php ./cli/create-user.php --user "$FRESHRSS_DEFAULT_USER" --password "$FRESHRSS_DEFAULT_PASSWORD" --language "${FRESHRSS_LANGUAGE:-en}" >/dev/null 2>&1
log_info "Ensure default user exists"
ERROR=$(/usr/bin/php ./cli/create-user.php \
--user "$FRESHRSS_DEFAULT_USER" \
--password "$FRESHRSS_DEFAULT_PASSWORD" \
--language "${FRESHRSS_LANGUAGE:-en}" \
2>&1)
EXITCODE=$?
if [ $EXITCODE -eq 3 ]; then
printf 'FreshRSS user already exists, no change performed\n'
log_info "FreshRSS user already exists, skipped"
elif [ $EXITCODE -eq 0 ]; then
printf 'FreshRSS user successfully created\n'
log_info "FreshRSS user successfully created"
./cli/list-users.php | xargs -n1 ./cli/actualize-user.php --user "$FRESHRSS_DEFAULT_USER"
else
rm -f /tmp/out.txt /tmp/err.txt
printf 'FreshRSS error during the creation of a user\n'
log_error "FreshRSS error during the creation of a user: ${ERROR}"
exit $EXITCODE
fi
fi
log_info "Start FreshRSS Server\n"
supercronic /etc/crontabs/nginx &
php-fpm7 -F &
exec nginx -g "daemon off;"