Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nVentiveUX/docker-ttrss
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master-2021.11.25
Choose a base ref
...
head repository: nVentiveUX/docker-ttrss
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2022.04.02
Choose a head ref
Loading
73 changes: 73 additions & 0 deletions .github/workflows/auto-update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: "Auto-update"

on:
workflow_dispatch:
schedule:
- cron: '0 8 * * 6'

jobs:
auto_update:
name: "Auto-update"
runs-on: "ubuntu-20.04"

steps:
- name: "Checkout project sources"
uses: "actions/checkout@v2"
with:
ref: "${{ github.head_ref }}"
path: "src"

- name: "Configure Git identity"
run: |
set -e
cd src/
git config --global user.name "bigbrozer"
git config --global user.email "<bigbrozer@users.noreply.github.com>"
- name: "Checkout TT-RSS sources"
run: |
set -e
git clone --branch=master https://git.tt-rss.org/fox/tt-rss.git ttrss
- name: "Get version details"
id: "versions"
run: |
set -e
ttrss_commit_now="$(awk 'match($0,/^ARG TTRSS_COMMIT="(.*)"/,m) {print m[1]}' src/Dockerfile)"
ttrss_commit_last="$(cd ttrss && git rev-parse --short=7 HEAD)"
echo "::set-output name=ttrss_commit_now::${ttrss_commit_now}"
echo "::set-output name=ttrss_commit_last::${ttrss_commit_last}"
echo "Set pipeline variable: ttrss_commit_now=${ttrss_commit_now}"
echo "Set pipeline variable: ttrss_commit_last=${ttrss_commit_last}"
- name: "Changes for TT-RSS"
id: "changes"
run: |
set -e
ttrss_changes="$(cd ttrss && git log --no-patch --oneline --format='* %s' ${{ steps.versions.outputs.ttrss_commit_now }}..${{ steps.versions.outputs.ttrss_commit_last }})"
if [[ -n "${ttrss_changes}" ]]
then
echo "${ttrss_changes}" | tee "/tmp/ttrss_changes"
echo "::set-output name=ttrss_has_changes::yes"
else
echo "No change. Up to date."
echo "::set-output name=ttrss_has_changes::no"
fi
- name: "Update version and tag"
if: ${{ success() && steps.changes.outputs.ttrss_has_changes == 'yes' }}
run: |
set -e
cd src/
sed -i -r \
-e "s#^ARG TTRSS_COMMIT=\".*\"#ARG TTRSS_COMMIT=\"${{ steps.versions.outputs.ttrss_commit_last }}\"#g" \
Dockerfile
git tag -a -F "/tmp/ttrss_changes" "$(date +"v%Y.%m.%d")"
- name: "Commits"
uses: "stefanzweifel/git-auto-commit-action@v4"
with:
repository: "src"
commit_message: "feat(ttrss): bump ttrss version to commit ${{ steps.versions.outputs.ttrss_commit_last }}"
push_options: '--follow-tags'
7 changes: 2 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: "Release"

on:
push:
branches:
- "master"
- "develop"
workflow_dispatch:
schedule:
- cron: '0 10 * * 6'
- cron: '0 12 * * 6'

jobs:
docker_image:
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
FROM alpine:3.13
FROM alpine:3.14

LABEL maintainers="Vincent BESANCON <besancon.vincent@gmail.com>"

# TTRSS upstream commit reference
ARG TTRSS_COMMIT="master"
ARG TTRSS_COMMIT="1703850"

SHELL ["/bin/ash", "-eo", "pipefail", "-c"]

# Database connection
ENV \
TTRSS_COMMIT=${TTRSS_COMMIT} \
TTRSS_DB_HOST="database" \
TTRSS_DB_NAME="ttrss" \
TTRSS_DB_PASS="ttrss" \
@@ -31,14 +32,14 @@ RUN mkdir -p /srv/ttrss /etc/nginx/ssl

# Install packages
RUN apk --update --no-cache add \
ca-certificates~=20191127 \
ca-certificates~=20211220 \
curl~=7 \
gettext~=0.20 \
git~=2.30 \
gettext~=0.21 \
git~=2.32 \
libxslt~=1.1 \
msmtp~=1.8 \
netcat-openbsd~=1.130 \
nginx~=1.18 \
nginx~=1.20 \
openssl~=1.1 \
php8~=8.0 \
php8-curl~=8.0 \
@@ -62,9 +63,8 @@ RUN apk --update --no-cache add \
php8-xsl~=8.0 \
supervisor~=4.2 \
&& ln -sv /usr/bin/php8 /usr/bin/php \
&& curl -SL \
https://git.tt-rss.org/git/tt-rss/archive/${TTRSS_COMMIT}.tar.gz \
| tar xzC /srv/ttrss --strip-components 1 \
&& git clone --branch master --depth 1 https://git.tt-rss.org/fox/tt-rss.git/ /srv/ttrss \
&& rm -rf /srv/ttrss/.git \
&& curl -SL \
https://github.com/levito/tt-rss-feedly-theme/archive/master.tar.gz \
| tar xzC /tmp \
@@ -82,8 +82,8 @@ RUN chown nginx:nginx -R /srv/ttrss

# Nginx configuration
COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/conf.d/ttrss.conf /etc/nginx/conf.d/ttrss.conf
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx/conf.d/ttrss.conf /etc/nginx/http.d/ttrss.conf
RUN rm /etc/nginx/http.d/default.conf

# PHP / PHP-FPM configuration
COPY php8/php-fpm.d/*.conf /etc/php8/php-fpm.d/
21 changes: 19 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
SHELL = /bin/bash
IMAGE := nventiveux/ttrss:latest

# Tasks
#
.PHONY: install
install:
.PHONY: venv
venv:
@pipenv install --dev

.PHONY: clean
clean: clean-tests

.PHONY: tests
tests: tests-image

.PHONY: clean-tests
clean-tests:
@docker rmi --force $(IMAGE)
$(MAKE) -C tests/ttrss-mysql down
$(MAKE) -C tests/ttrss-pgsql down

.PHONY: tests-image
tests-image:
@docker build --rm --no-cache --tag $(IMAGE) .

.PHONY: tests-mysql
tests-mysql:
$(MAKE) -C tests/ttrss-mysql up
4 changes: 2 additions & 2 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -18,5 +18,5 @@ http {
sendfile on;
keepalive_timeout 65;

include /etc/nginx/conf.d/*.conf;
}
include /etc/nginx/http.d/*.conf;
}
4 changes: 4 additions & 0 deletions tests/ttrss-mysql/Makefile
Original file line number Diff line number Diff line change
@@ -3,3 +3,7 @@ SHELL := /bin/bash
.PHONY: up
up:
@docker compose up --build

.PHONY: down
down:
@docker compose down --volumes --rmi local
2 changes: 0 additions & 2 deletions tests/ttrss-mysql/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.8"

services:
database:
image: mysql:8.0.23
4 changes: 4 additions & 0 deletions tests/ttrss-pgsql/Makefile
Original file line number Diff line number Diff line change
@@ -3,3 +3,7 @@ SHELL := /bin/bash
.PHONY: up
up:
@docker compose up --build

.PHONY: down
down:
@docker compose down --volumes --rmi local
2 changes: 0 additions & 2 deletions tests/ttrss-pgsql/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.8"

services:
database:
image: postgres:12.6-alpine