Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add versioning #943

Open
wants to merge 4 commits into
base: nginx-proxy-confs
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/BuildImage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
echo "BASEIMAGE=${{ env.BASEIMAGE }}" >> $GITHUB_OUTPUT
echo "MODNAME=${{ env.MODNAME }}" >> $GITHUB_OUTPUT
# **** If the mod needs to be versioned, set the versioning logic below. Otherwise leave as is. ****
MOD_VERSION=""
MOD_VERSION="$(curl -fsSL https://api.github.com/repos/linuxserver/reverse-proxy-confs/commits/master | jq -r '.sha')"
echo "MOD_VERSION=${MOD_VERSION}" >> $GITHUB_OUTPUT
outputs:
GITHUB_REPO: ${{ steps.outputs.outputs.GITHUB_REPO }}
Expand Down
20 changes: 13 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/baseimage-alpine:3.19 as grab-stage
FROM ghcr.io/linuxserver/baseimage-alpine:3.20 AS grab-stage

ARG MOD_VERSION

RUN \
apk add --no-cache --upgrade \
tar && \
mkdir -p /root/defaults/nginx/proxy-confs && \
if [[ -z "${MOD_VERSION}" ]]; then \
MOD_VERSION=$(curl -fsSL https://api.github.com/repos/linuxserver/reverse-proxy-confs/commits/master | jq -r '.sha'); \
fi && \
curl -o \
/tmp/proxy.tar.gz -L \
"https://github.com/linuxserver/reverse-proxy-confs/tarball/master" && \
tar xf \
"https://github.com/linuxserver/reverse-proxy-confs/archive/${MOD_VERSION}.tar.gz" && \
tar xvf \
/tmp/proxy.tar.gz -C \
/root/defaults/nginx/proxy-confs \
--strip-components=1 \
--exclude=linux*/.gitattributes \
--exclude=linux*/.github \
--exclude=linux*/.gitignore \
--exclude=linux*/LICENSE
--exclude=reverse*/.editorconfig \
--exclude=reverse*/.gitattributes \
--exclude=reverse*/.github \
--exclude=reverse*/.gitignore \
--exclude=reverse*/LICENSE
# copy local files
COPY root/ root/

Expand Down
9 changes: 5 additions & 4 deletions root/defaults/nginx/site-confs/default.conf.sample
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Version 2023/05/18 - Changelog: https://github.com/linuxserver/docker-mods/commits/nginx-proxy-confs/root/defaults/nginx/site-confs/default.conf.sample
## Version 2024/08/23 - Changelog: https://github.com/linuxserver/docker-mods/commits/nginx-proxy-confs/root/defaults/nginx/site-confs/default.conf.sample

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

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

server_name _;

Expand All @@ -26,11 +26,12 @@ server {
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;

try_files $uri $uri/ /index.html /index.php$is_args$args =404;
try_files $uri $uri/ /index.html /index.htm /index.php$is_args$args;
}

location ~ ^(.+\.php)(.*)$ {
fastcgi_split_path_info ^(.+\.php)(.*)$;
if (!-f $document_root$fastcgi_script_name) { return 404; }
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
Expand Down