Skip to content

Commit

Permalink
Use standard nginx.conf from lsio alpine nginx base image
Browse files Browse the repository at this point in the history
  • Loading branch information
nemchik committed Aug 14, 2022
1 parent 7c5f4da commit 6847e4c
Show file tree
Hide file tree
Showing 9 changed files with 171 additions and 152 deletions.
75 changes: 37 additions & 38 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.13
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.15

# set version label
ARG BUILD_DATE
Expand All @@ -8,46 +8,45 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="aptalca"

RUN \
echo "**** install runtime packages ****" && \
apk add --no-cache \
curl \
php7-ctype \
php7-curl \
php7-dom \
php7-gmp \
php7-iconv \
php7-intl \
php7-mysqli \
php7-mysqlnd \
php7-pdo_mysql \
php7-pdo_pgsql \
php7-pdo_sqlite \
php7-pgsql \
php7-sqlite3 \
php7-zip \
sqlite && \
echo "**** install app ****" && \
if [ -z ${FRESHRSS_RELEASE+x} ]; then \
FRESHRSS_RELEASE=$(curl -sX GET "https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
mkdir -p \
/usr/share/webapps/freshrss && \
curl -o \
/tmp/freshrss.tar.gz -L \
"https://github.com/FreshRSS/FreshRSS/archive/${FRESHRSS_RELEASE}.tar.gz" && \
tar xf \
/tmp/freshrss.tar.gz -C \
/usr/share/webapps/freshrss --strip-components=1 && \
sed -i "s|'disable_update' => false,|'disable_update' => true,|g" \
/usr/share/webapps/freshrss/config.default.php && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
echo "**** install runtime packages ****" && \
apk add --no-cache \
curl \
php8-ctype \
php8-curl \
php8-dom \
php8-gmp \
php8-iconv \
php8-intl \
php8-mysqli \
php8-mysqlnd \
php8-pdo_mysql \
php8-pdo_pgsql \
php8-pdo_sqlite \
php8-pgsql \
php8-sqlite3 \
php8-zip \
sqlite && \
echo "**** install app ****" && \
if [ -z ${FRESHRSS_RELEASE+x} ]; then \
FRESHRSS_RELEASE=$(curl -sX GET "https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
mkdir -p \
/app/www/public && \
curl -o \
/tmp/freshrss.tar.gz -L \
"https://github.com/FreshRSS/FreshRSS/archive/${FRESHRSS_RELEASE}.tar.gz" && \
tar xf \
/tmp/freshrss.tar.gz -C \
/app/www/public --strip-components=1 && \
sed -i "s|'disable_update' => false,|'disable_update' => true,|g" \
/app/www/public/config.default.php && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*

# copy local files
COPY root/ /

# ports and volumes
EXPOSE 80 443
VOLUME /config
75 changes: 37 additions & 38 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.13
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.15

# set version label
ARG BUILD_DATE
Expand All @@ -8,46 +8,45 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="aptalca"

RUN \
echo "**** install runtime packages ****" && \
apk add --no-cache \
curl \
php7-ctype \
php7-curl \
php7-dom \
php7-gmp \
php7-iconv \
php7-intl \
php7-mysqli \
php7-mysqlnd \
php7-pdo_mysql \
php7-pdo_pgsql \
php7-pdo_sqlite \
php7-pgsql \
php7-sqlite3 \
php7-zip \
sqlite && \
echo "**** install app ****" && \
if [ -z ${FRESHRSS_RELEASE+x} ]; then \
FRESHRSS_RELEASE=$(curl -sX GET "https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
mkdir -p \
/usr/share/webapps/freshrss && \
curl -o \
/tmp/freshrss.tar.gz -L \
"https://github.com/FreshRSS/FreshRSS/archive/${FRESHRSS_RELEASE}.tar.gz" && \
tar xf \
/tmp/freshrss.tar.gz -C \
/usr/share/webapps/freshrss --strip-components=1 && \
sed -i "s|'disable_update' => false,|'disable_update' => true,|g" \
/usr/share/webapps/freshrss/config.default.php && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
echo "**** install runtime packages ****" && \
apk add --no-cache \
curl \
php8-ctype \
php8-curl \
php8-dom \
php8-gmp \
php8-iconv \
php8-intl \
php8-mysqli \
php8-mysqlnd \
php8-pdo_mysql \
php8-pdo_pgsql \
php8-pdo_sqlite \
php8-pgsql \
php8-sqlite3 \
php8-zip \
sqlite && \
echo "**** install app ****" && \
if [ -z ${FRESHRSS_RELEASE+x} ]; then \
FRESHRSS_RELEASE=$(curl -sX GET "https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
mkdir -p \
/app/www/public && \
curl -o \
/tmp/freshrss.tar.gz -L \
"https://github.com/FreshRSS/FreshRSS/archive/${FRESHRSS_RELEASE}.tar.gz" && \
tar xf \
/tmp/freshrss.tar.gz -C \
/app/www/public --strip-components=1 && \
sed -i "s|'disable_update' => false,|'disable_update' => true,|g" \
/app/www/public/config.default.php && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*

# copy local files
COPY root/ /

# ports and volumes
EXPOSE 80 443
VOLUME /config
75 changes: 37 additions & 38 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.13
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.15

# set version label
ARG BUILD_DATE
Expand All @@ -8,46 +8,45 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="aptalca"

RUN \
echo "**** install runtime packages ****" && \
apk add --no-cache \
curl \
php7-ctype \
php7-curl \
php7-dom \
php7-gmp \
php7-iconv \
php7-intl \
php7-mysqli \
php7-mysqlnd \
php7-pdo_mysql \
php7-pdo_pgsql \
php7-pdo_sqlite \
php7-pgsql \
php7-sqlite3 \
php7-zip \
sqlite && \
echo "**** install app ****" && \
if [ -z ${FRESHRSS_RELEASE+x} ]; then \
FRESHRSS_RELEASE=$(curl -sX GET "https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
mkdir -p \
/usr/share/webapps/freshrss && \
curl -o \
/tmp/freshrss.tar.gz -L \
"https://github.com/FreshRSS/FreshRSS/archive/${FRESHRSS_RELEASE}.tar.gz" && \
tar xf \
/tmp/freshrss.tar.gz -C \
/usr/share/webapps/freshrss --strip-components=1 && \
sed -i "s|'disable_update' => false,|'disable_update' => true,|g" \
/usr/share/webapps/freshrss/config.default.php && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
echo "**** install runtime packages ****" && \
apk add --no-cache \
curl \
php8-ctype \
php8-curl \
php8-dom \
php8-gmp \
php8-iconv \
php8-intl \
php8-mysqli \
php8-mysqlnd \
php8-pdo_mysql \
php8-pdo_pgsql \
php8-pdo_sqlite \
php8-pgsql \
php8-sqlite3 \
php8-zip \
sqlite && \
echo "**** install app ****" && \
if [ -z ${FRESHRSS_RELEASE+x} ]; then \
FRESHRSS_RELEASE=$(curl -sX GET "https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
mkdir -p \
/app/www/public && \
curl -o \
/tmp/freshrss.tar.gz -L \
"https://github.com/FreshRSS/FreshRSS/archive/${FRESHRSS_RELEASE}.tar.gz" && \
tar xf \
/tmp/freshrss.tar.gz -C \
/app/www/public --strip-components=1 && \
sed -i "s|'disable_update' => false,|'disable_update' => true,|g" \
/app/www/public/config.default.php && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*

# copy local files
COPY root/ /

# ports and volumes
EXPOSE 80 443
VOLUME /config
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **22.12.21:** - Rebasing to alpine 3.15 with php8. Restructure nginx configs ([see changes in base](https://github.com/linuxserver/docker-baseimage-alpine-nginx/pull/84)).
* **23.01.21:** - Rebasing to alpine 3.13.
* **01.06.20:** - Rebasing to alpine 3.12.
* **31.03.20:** - Internalize app and enable updates for existing users, allow user customized crontab.
Expand Down
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ app_setup_block: |
# changelog
changelogs:
- { date: "12.08.22:", desc: "Rebasing to alpine 3.15 with php8. Restructure nginx configs ([see changes in base](https://github.com/linuxserver/docker-baseimage-alpine-nginx/pull/84))." }
- { date: "23.01.21:", desc: "Rebasing to alpine 3.13." }
- { date: "01.06.20:", desc: "Rebasing to alpine 3.12." }
- { date: "31.03.20:", desc: "Internalize app and enable updates for existing users, allow user customized crontab." }
Expand Down
2 changes: 1 addition & 1 deletion root/defaults/root → root/defaults/crontabs/root
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
0 3 * * 6 run-parts /etc/periodic/weekly
0 5 1 * * run-parts /etc/periodic/monthly
# freshrss cronjob
*/15 * * * * /usr/bin/php7 /usr/share/webapps/freshrss/app/actualize_script.php > /tmp/FreshRSS.log 2>&1
*/15 * * * * /usr/bin/php8 /app/www/public/app/actualize_script.php > /tmp/FreshRSS.log 2>&1
22 changes: 0 additions & 22 deletions root/defaults/default

This file was deleted.

34 changes: 34 additions & 0 deletions root/defaults/nginx/site-confs/default.conf.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Version 2022/08/12 - Changelog: https://github.com/linuxserver/docker-freshrss/commits/master/root/defaults/nginx/site-confs/default.conf.sample

server {
listen 80 default_server;
listen [::]:80 default_server;

listen 443 ssl http2;
listen [::]:443 ssl http2;

server_name _;

root /app/www/public/p;
index index.html index.htm index.php;

location / {
# enable for basic auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;

try_files $uri $uri/ /index.php?$query_string;
}

location ~ ^(.+\.php)(.*)$ {
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}

# deny access to .htaccess/.htpasswd files
location ~ /\.ht {
deny all;
}
}
Loading

0 comments on commit 6847e4c

Please sign in to comment.