Skip to content

Commit 0a9af58

Browse files
authored
Beta/v0.7.6 (#697)
1 parent 4037475 commit 0a9af58

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+626
-288
lines changed

.github/workflows/pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
uses: docker/build-push-action@v6
105105
with:
106106
context: .
107-
file: ./_docker/Dockerfile
107+
file: ./_docker/Dockerfile.slim
108108
push: false # Do not push the image for now
109109
tags: ${{ steps.meta.outputs.tags }}
110110
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/release_dev.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ jobs:
5555
build-args: |
5656
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
5757
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
58-
platforms: linux/amd64
59-
file: ./_docker/Dockerfile
58+
platforms: linux/amd64,linux/arm64
59+
file: ./_docker/Dockerfile.slim
6060
push: true
6161
tags: ${{ steps.modify-json.outputs.cleaned_tag }}
6262
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/release_docker.yaml

Lines changed: 0 additions & 125 deletions
This file was deleted.

.github/workflows/tag.yaml

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,75 @@ jobs:
9191
build-args: |
9292
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
9393
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
94-
platforms: linux/amd64,linux/arm64,linux/arm/v7
94+
platforms: linux/amd64,linux/arm64
9595
file: ./_docker/Dockerfile
9696
push: true
9797
tags: ${{ steps.modify-json.outputs.cleaned_tag }}
9898
labels: ${{ steps.meta.outputs.labels }}
99+
100+
push_slim_release_to_registry:
101+
name: Push slim release
102+
runs-on: ubuntu-latest
103+
steps:
104+
- name: Checkout
105+
uses: actions/checkout@v4
106+
- name: Set up QEMU
107+
uses: docker/[email protected]
108+
- name: Set up Docker Buildx
109+
uses: docker/[email protected]
110+
- name: Login to Docker Hub
111+
uses: docker/login-action@v3
112+
with:
113+
username: ${{ secrets.DOCKERHUB_USERNAME }}
114+
password: ${{ secrets.DOCKERHUB_TOKEN }}
115+
- name: Login to GitHub Container Registry
116+
uses: docker/login-action@v3
117+
with:
118+
registry: ghcr.io
119+
username: ${{github.actor}}
120+
password: ${{ secrets.PAT }}
121+
- name: Extract metadata (tags, labels) for Docker and GHCR
122+
id: meta
123+
uses: docker/metadata-action@v5
124+
with:
125+
images: |
126+
gtstef/filebrowser
127+
ghcr.io/gtsteffaniak/filebrowser
128+
- name: Modify tags for slim image
129+
id: modify-tags-slim
130+
run: |
131+
TAG_OR_BRANCH="${{ github.ref_name }}"
132+
CLEAN_TAG=$(echo "$TAG_OR_BRANCH" | sed 's/^v//')
133+
BASE_TAG="gtstef/filebrowser:${CLEAN_TAG}-slim"
134+
TAGS=("$BASE_TAG")
135+
if echo "$CLEAN_TAG" | grep -qi "beta"; then
136+
TAGS+=(
137+
"gtstef/filebrowser:beta-slim"
138+
"ghcr.io/gtsteffaniak/filebrowser:beta-slim"
139+
"gtstef/filebrowser:slim"
140+
"ghcr.io/gtsteffaniak/filebrowser:slim"
141+
)
142+
elif echo "$CLEAN_TAG" | grep -qi "stable"; then
143+
TAGS+=(
144+
"gtstef/filebrowser:stable-slim"
145+
"ghcr.io/gtsteffaniak/filebrowser:stable-slim"
146+
"gtstef/filebrowser:slim"
147+
"ghcr.io/gtsteffaniak/filebrowser:slim"
148+
)
149+
fi
150+
TAGS_CSV=$(IFS=, ; echo "${TAGS[*]}")
151+
echo "$TAGS_CSV" > modified_tags.txt # Optional debug output
152+
echo "cleaned_tag=$TAGS_CSV" >> $GITHUB_OUTPUT
153+
- name: Build and push slim image
154+
uses: docker/build-push-action@v6
155+
with:
156+
context: .
157+
build-args: |
158+
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
159+
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
160+
platforms: linux/amd64,linux/arm64,linux/arm/v7
161+
file: ./_docker/Dockerfile.slim
162+
latest: false
163+
push: true
164+
tags: ${{ steps.modify-json-slim.outputs.cleaned_tag }}
165+
labels: ${{ steps.meta.outputs.labels }}

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,39 @@
22

33
All notable changes to this project will be documented in this file. For commit guidelines, please refer to [Standard Version](https://github.com/conventional-changelog/standard-version).
44

5+
## v0.7.6-beta
6+
7+
NOTE: if using docker arm32 image, you will need to switch to the slim images. The regular docker images are much larger now and support generating office previews out of the box without any only office running. However, they don't support arm32. Also, be aware the docker images are much larger now (600MB I believe) because of the office document preview support -- if thats not something you care about you can switch to the slim images.
8+
9+
**New Features**:
10+
- native document preview generation enabled for certain document types on the regular docker image (no office integration needed)
11+
- supported native document preview types:
12+
- ".pdf", // PDF
13+
- ".xps", // XPS
14+
- ".epub", // EPUB
15+
- ".mobi", // MOBI
16+
- ".fb2", // FB2
17+
- ".cbz", // CBZ
18+
- ".svg", // SVG
19+
- ".txt", // TXT
20+
- ".doc", // DOC
21+
- ".docx", // DOCX
22+
- ".ppt", // PPT
23+
- ".pptx", // PPTX
24+
- ".xls", // excel xls
25+
- ".xlsx", // exel XLSX
26+
- ".hwp", // HWP
27+
- ".hwp", // HWPX
28+
- proxy logout redirectUrl support via `auth.methods.proxy.logoutRedirectUrl` https://github.com/gtsteffaniak/filebrowser/issues/684
29+
30+
**Notes**:
31+
- image loading placeholders added and remain if image can't be loaded.
32+
- no more arm32 support on main image -- use a `slim` tagged image.
33+
34+
**BugFixes**:
35+
- onlyoffice and other cache issues https://github.com/gtsteffaniak/filebrowser/issues/686
36+
- gallery size indicator centering https://github.com/gtsteffaniak/filebrowser/issues/652
37+
538
## v0.7.5-beta
639

740
**New Features**

_docker/Dockerfile

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,28 @@
1+
FROM gtstef/ffmpeg:7.1.1 AS ffmpeg
12
FROM golang:1.24-alpine AS base
23
ARG VERSION
34
ARG REVISION
45
WORKDIR /app
56
COPY ./backend ./
67
#RUN swag init --output swagger/docs
78
RUN ln -s swagger /usr/local/go/src/
8-
RUN go build -ldflags="-w -s \
9+
RUN go build -tags pdf -ldflags="-w -s \
910
-X 'github.com/gtsteffaniak/filebrowser/backend/common/version.Version=${VERSION}' \
1011
-X 'github.com/gtsteffaniak/filebrowser/backend/common/version.CommitSHA=${REVISION}'" \
1112
-o filebrowser .
1213

13-
FROM node:slim AS nbuild
14+
FROM node:lts-slim AS nbuild
1415
WORKDIR /app
1516
COPY ./frontend/package.json ./
1617
RUN npm i --maxsockets 1
1718
COPY ./frontend/ ./
1819
RUN npm run build-docker
1920

2021
FROM alpine:latest
21-
22-
RUN apk add --no-cache curl xz && \
23-
ARCH=$(uname -m) && \
24-
case "$ARCH" in \
25-
x86_64) URL="https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz" ;; \
26-
aarch64) URL="https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-arm64-static.tar.xz" ;; \
27-
armv7l) URL="https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-armhf-static.tar.xz" ;; \
28-
*) echo "Unsupported architecture: $ARCH" && exit 1 ;; \
29-
esac && \
30-
mkdir -p /tmp/ffmpeg && \
31-
curl -L "$URL" | tar -xJ -C /tmp/ffmpeg && \
32-
mv /tmp/ffmpeg/ffmpeg-*/ffmpeg /usr/local/bin/ && \
33-
mv /tmp/ffmpeg/ffmpeg-*/ffprobe /usr/local/bin/ && \
34-
chmod +x /usr/local/bin/ffmpeg /usr/local/bin/ffprobe && \
35-
rm -rf /tmp/ffmpeg && \
36-
apk del curl xz && \
37-
rm -rf /var/cache/apk/*
22+
COPY --from=ffmpeg [ "/ffmpeg", "/ffprobe", "/usr/local/bin/" ]
23+
# requirements to enable pdf support
24+
RUN apk add --no-cache libffi mupdf && \
25+
find / -name "libmupdf.so*" -type f -exec mv {} /usr/lib/libmupdf.so \;
3826

3927
ENV FILEBROWSER_FFMPEG_PATH="/usr/local/bin/"
4028
ENV FILEBROWSER_NO_EMBEDED="true"

_docker/Dockerfile.slim

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
FROM golang:1.24-alpine AS base
2+
ARG VERSION
3+
ARG REVISION
4+
WORKDIR /app
5+
COPY ./backend ./
6+
#RUN swag init --output swagger/docs
7+
RUN ln -s swagger /usr/local/go/src/
8+
RUN go build -ldflags="-w -s \
9+
-X 'github.com/gtsteffaniak/filebrowser/backend/common/version.Version=${VERSION}' \
10+
-X 'github.com/gtsteffaniak/filebrowser/backend/common/version.CommitSHA=${REVISION}'" \
11+
-o filebrowser .
12+
13+
FROM node:lts-slim AS nbuild
14+
WORKDIR /app
15+
COPY ./frontend/package.json ./
16+
RUN npm i --maxsockets 1
17+
COPY ./frontend/ ./
18+
RUN npm run build-docker
19+
20+
FROM alpine:latest
21+
22+
RUN apk add --no-cache curl xz && \
23+
ARCH=$(uname -m) && \
24+
case "$ARCH" in \
25+
x86_64) URL="https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz" ;; \
26+
aarch64) URL="https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-arm64-static.tar.xz" ;; \
27+
armv7l) URL="https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-armhf-static.tar.xz" ;; \
28+
*) echo "Unsupported architecture: $ARCH" && exit 1 ;; \
29+
esac && \
30+
mkdir -p /tmp/ffmpeg && \
31+
curl -L "$URL" | tar -xJ -C /tmp/ffmpeg && \
32+
mv /tmp/ffmpeg/ffmpeg-*/ffmpeg /usr/local/bin/ && \
33+
mv /tmp/ffmpeg/ffmpeg-*/ffprobe /usr/local/bin/ && \
34+
chmod +x /usr/local/bin/ffmpeg /usr/local/bin/ffprobe && \
35+
rm -rf /tmp/ffmpeg && \
36+
apk del curl xz && \
37+
rm -rf /var/cache/apk/*
38+
39+
ENV FILEBROWSER_FFMPEG_PATH="/usr/local/bin/"
40+
ENV FILEBROWSER_NO_EMBEDED="true"
41+
ENV PATH="$PATH:/home/filebrowser"
42+
RUN apk --no-cache add ca-certificates mailcap tzdata
43+
RUN adduser -D -s /bin/true -u 1000 filebrowser
44+
USER filebrowser
45+
WORKDIR /home/filebrowser
46+
COPY --from=base --chown=filebrowser:1000 /app/filebrowser* ./
47+
COPY --from=base --chown=filebrowser:1000 /app/config.media.yaml ./config.yaml
48+
COPY --from=nbuild --chown=filebrowser:1000 /app/dist/ ./http/dist/
49+
50+
## sanity checks
51+
RUN [ "filebrowser", "version" ]
52+
RUN [ "ffmpeg", "-version" ]
53+
RUN [ "ffprobe", "-version" ]
54+
55+
USER root
56+
# exposing default port for auto discovery.
57+
EXPOSE 80
58+
ENTRYPOINT [ "./filebrowser" ]

_docker/src/proxy/backend/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ auth:
2323
enabled: true
2424
header: "X-Username"
2525
createUser: true
26+
logoutRedirectUrl: "https://localhost/api/auth/logout2"
2627

2728
userDefaults:
2829
darkMode: true

0 commit comments

Comments
 (0)