Skip to content

Commit f402097

Browse files
Beta/v0.7.7 (#728)
Co-authored-by: Gilles <[email protected]>
1 parent 9f156fd commit f402097

Some content is hidden

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

77 files changed

+1394
-468
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
backend/**.db
22
backend/tmp
3+
backend/backend*
34
backend/vendor/**
45
frontend/dist/**
56
frontend/node_modules/**

.github/workflows/pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
file: ./_docker/Dockerfile.playwright-noauth
8282
push: false
8383
push_pr_to_registry:
84-
name: Push PR
84+
name: Build docker image
8585
runs-on: ubuntu-latest
8686
steps:
8787
- name: Checkout

.github/workflows/regular-tests.yaml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@ jobs:
1515
go-version: 'stable'
1616
- working-directory: backend
1717
run: go test -race -v ./...
18-
lint-backend:
19-
runs-on: ubuntu-latest
20-
steps:
21-
- uses: actions/checkout@v4
22-
- uses: actions/setup-go@v5
23-
with:
24-
go-version: 'stable'
25-
- uses: golangci/golangci-lint-action@v5
26-
with:
27-
version: 'v1.64'
28-
working-directory: backend
18+
# golanci-lint is currently disabled due to slowness
19+
# lint-backend:
20+
# runs-on: ubuntu-latest
21+
# steps:
22+
# - uses: actions/checkout@v4
23+
# - uses: actions/setup-go@v5
24+
# with:
25+
# go-version: 'stable'
26+
# - uses: golangci/golangci-lint-action@v5
27+
# with:
28+
# version: 'v1.64'
29+
# working-directory: backend
2930
format-backend:
3031
runs-on: ubuntu-latest
3132
steps:

.github/workflows/release_dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
5757
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
5858
platforms: linux/amd64,linux/arm64
59-
file: ./_docker/Dockerfile.slim
59+
file: ./_docker/Dockerfile
6060
push: true
6161
tags: ${{ steps.modify-json.outputs.cleaned_tag }}
6262
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/tag.yaml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ jobs:
2121
run: npm i && npm run build
2222
working-directory: frontend
2323
- name: Install OS Requirements
24-
run: sudo apt update && sudo apt install -y upx gcc-multilib g++-multilib
25-
- name: Install Cross Compilers
26-
run: sudo apt update && sudo apt install -y gcc-mingw-w64 gcc-aarch64-linux-gnu
24+
run: sudo apt update && sudo apt install -y upx build-essential musl-tools
25+
- uses: goto-bus-stop/setup-zig@v2
2726
- name: Run GoReleaser
2827
uses: goreleaser/goreleaser-action@v6
2928
with:
@@ -65,7 +64,10 @@ jobs:
6564
run: |
6665
JSON='${{ steps.meta.outputs.json }}'
6766
MODIFIED_JSON=$(echo "$JSON" | jq '
68-
.tags |= map(sub(":v"; ":")) |
67+
.tags |= map(
68+
sub(":v"; ":") # Strip the 'v'
69+
| select(test(":latest") | not)
70+
) |
6971
if any(.tags[]; test("beta")) then
7072
.tags += [
7173
"gtstef/filebrowser:beta",
@@ -126,26 +128,27 @@ jobs:
126128
images: |
127129
gtstef/filebrowser
128130
ghcr.io/gtsteffaniak/filebrowser
129-
- name: Modify tags (strip 'v' and add 'beta'/'stable' if needed)
131+
- name: Modify tags (strip 'v' and add 'slim' if needed)
130132
id: modify-json-slim
131133
run: |
132134
JSON='${{ steps.meta.outputs.json }}'
133135
MODIFIED_JSON=$(echo "$JSON" | jq '
134136
.tags |= map(
135137
sub(":v"; ":") # Strip the 'v'
136138
| select(test(":latest") | not)
137-
| sub(":(.+)"; ":\(.captures[0])-slim")
139+
# Add guard to only modify tags with a version
140+
| if test(":(.+)") then sub(":(.+)"; ":\(.captures[0])-slim") else . end
138141
) |
139142
if any(.tags[]; test("beta")) then
140143
.tags += [
141-
"gtstef/filebrowser:beta",
142-
"ghcr.io/gtsteffaniak/filebrowser:beta"
144+
"gtstef/filebrowser:beta-slim",
145+
"ghcr.io/gtsteffaniak/filebrowser:beta-slim"
143146
]
144147
else . end |
145148
if any(.tags[]; test("stable")) then
146149
.tags += [
147-
"gtstef/filebrowser:stable",
148-
"ghcr.io/gtsteffaniak/filebrowser:stable"
150+
"gtstef/filebrowser:stable-slim",
151+
"ghcr.io/gtsteffaniak/filebrowser:stable-slim"
149152
]
150153
else . end
151154
')

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ rice-box.go
1010
/backend/filebrowser.exe
1111
/backend/backend.exe
1212
/backend/tmp
13+
/backend/dist
1314
/frontend/dist
1415
/frontend/pkg
1516
/frontend/test-results

CHANGELOG.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,31 @@
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
5+
## v0.7.7-beta
6+
7+
This release cleans up some of the native preview (image preview) feature logic. And adds simple docx and epub viewers as well. Going through all of this, I think I know how I can add full-fledge google doc and microsoft office viewer support (no edit). But, for now "onlyOffice" remains the most comprehensive solution with most compatibility and ability to fully edit. One day, I think I will be able to integrate a minimal license-free server into the docker image. But that's something for another time.
8+
9+
Native preview (image preview) support is also available for linux arm64 and amd64 binaries, and windows exe.
10+
11+
**New Features**:
12+
- since theres a wider kind of document preview types, a new disableOfficePreviewExt option has been added.
13+
- native (and simple) docx and epub viewers.
14+
- Other documents like xlsx get full size image preview when opened and no onlyoffice support.
615

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.
16+
**Notes**:
17+
- all text mimetype files have preview support.
18+
- high-quality preview image sizes bumped from 512x512 to 640x640 to help make text previews readable.
19+
- no config is allowed and defaults to on source at current directory.
20+
21+
**BugFixes**:
22+
- fix otp clearing on user save https://github.com/gtsteffaniak/filebrowser/issues/699
23+
- admin special characters and general login improvements https://github.com/gtsteffaniak/filebrowser/issues/594
24+
- updated editor caching behavior https://github.com/gtsteffaniak/filebrowser/issues/701
25+
- move/copy file path issue and overwrite https://github.com/gtsteffaniak/filebrowser/issues/687
26+
- fix popup preview loading on safari
27+
- `preview.highQuality` only affects gallery view mode. popop preview is always high quality, and icons are always low quality.
28+
29+
## v0.7.6-beta
830

931
**New Features**:
1032
- native document preview generation enabled for certain document types on the regular docker image (no office integration needed)
@@ -17,11 +39,9 @@ NOTE: if using docker arm32 image, you will need to switch to the slim images. T
1739
- ".cbz", // CBZ
1840
- ".svg", // SVG
1941
- ".txt", // TXT
20-
- ".doc", // DOC
2142
- ".docx", // DOCX
2243
- ".ppt", // PPT
2344
- ".pptx", // PPTX
24-
- ".xls", // excel xls
2545
- ".xlsx", // exel XLSX
2646
- ".hwp", // HWP
2747
- ".hwp", // HWPX

_docker/Dockerfile

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
FROM gtstef/ffmpeg:7.1.1 AS ffmpeg
2-
FROM golang:1.24-alpine AS base
1+
FROM gtstef/ffmpeg:7.1.1-decode AS ffmpeg
2+
FROM golang:alpine AS base
33
ARG VERSION
44
ARG REVISION
55
WORKDIR /app
66
COPY ./backend ./
7-
#RUN swag init --output swagger/docs
8-
RUN ln -s swagger /usr/local/go/src/
9-
RUN go build -tags pdf -ldflags="-w -s \
7+
RUN apk update && apk add --no-cache gcc musl-dev upx
8+
ENV CGO_ENABLED=1
9+
RUN go build -tags mupdf,musl -ldflags="-w -s \
1010
-X 'github.com/gtsteffaniak/filebrowser/backend/common/version.Version=${VERSION}' \
1111
-X 'github.com/gtsteffaniak/filebrowser/backend/common/version.CommitSHA=${REVISION}'" \
1212
-o filebrowser .
13+
RUN upx filebrowser
1314

1415
FROM node:lts-slim AS nbuild
1516
WORKDIR /app
@@ -20,9 +21,6 @@ RUN npm run build-docker
2021

2122
FROM alpine:latest
2223
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 \;
2624

2725
ENV FILEBROWSER_FFMPEG_PATH="/usr/local/bin/"
2826
ENV FILEBROWSER_NO_EMBEDED="true"
@@ -31,15 +29,13 @@ RUN apk --no-cache add ca-certificates mailcap tzdata
3129
RUN adduser -D -s /bin/true -u 1000 filebrowser
3230
USER filebrowser
3331
WORKDIR /home/filebrowser
34-
COPY --from=base --chown=filebrowser:1000 /app/filebrowser* ./
32+
COPY --from=base --chown=filebrowser:1000 /app/filebrowser ./
3533
COPY --from=base --chown=filebrowser:1000 /app/config.media.yaml ./config.yaml
3634
COPY --from=nbuild --chown=filebrowser:1000 /app/dist/ ./http/dist/
37-
3835
## sanity checks
3936
RUN [ "filebrowser", "version" ]
4037
RUN [ "ffmpeg", "-version" ]
4138
RUN [ "ffprobe", "-version" ]
42-
4339
USER root
4440
# exposing default port for auto discovery.
4541
EXPOSE 80

_docker/Dockerfile.slim

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
FROM golang:1.24-alpine AS base
1+
FROM golang:alpine AS base
22
ARG VERSION
33
ARG REVISION
44
WORKDIR /app
55
COPY ./backend ./
6-
#RUN swag init --output swagger/docs
7-
RUN ln -s swagger /usr/local/go/src/
6+
RUN apk update && apk add upx
87
RUN go build -ldflags="-w -s \
98
-X 'github.com/gtsteffaniak/filebrowser/backend/common/version.Version=${VERSION}' \
109
-X 'github.com/gtsteffaniak/filebrowser/backend/common/version.CommitSHA=${REVISION}'" \
1110
-o filebrowser .
11+
RUN upx filebrowser
1212

1313
FROM node:lts-slim AS nbuild
1414
WORKDIR /app
@@ -18,40 +18,17 @@ COPY ./frontend/ ./
1818
RUN npm run build-docker
1919

2020
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/"
4021
ENV FILEBROWSER_NO_EMBEDED="true"
4122
ENV PATH="$PATH:/home/filebrowser"
4223
RUN apk --no-cache add ca-certificates mailcap tzdata
4324
RUN adduser -D -s /bin/true -u 1000 filebrowser
4425
USER filebrowser
4526
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
27+
COPY --from=base --chown=filebrowser:1000 /app/filebrowser ./
28+
COPY --from=base --chown=filebrowser:1000 /app/config.yaml ./config.yaml
4829
COPY --from=nbuild --chown=filebrowser:1000 /app/dist/ ./http/dist/
49-
5030
## sanity checks
5131
RUN [ "filebrowser", "version" ]
52-
RUN [ "ffmpeg", "-version" ]
53-
RUN [ "ffprobe", "-version" ]
54-
5532
USER root
5633
# exposing default port for auto discovery.
5734
EXPOSE 80

backend/.goreleaser.yaml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,29 @@ builds:
1616
goos:
1717
- linux
1818
goarch:
19-
- arm64
19+
- amd64
2020
hooks:
2121
post:
22-
- upx {{ .Path }} # Compress the binary with UPX
22+
- upx {{ .Path }}
2323

24-
# Build configuration for linux amd64
24+
# Build configuration for linux arm64
2525
- id: linux-arm64
26+
ldflags: *ldflags
27+
main: main.go
28+
binary: filebrowser
2629
env:
2730
- CGO_ENABLED=1
28-
- CC=aarch64-linux-gnu-gcc
29-
- CXX=aarch64-linux-gnu-g++
31+
- CC=zig cc -target aarch64-linux-musl
3032
tags:
3133
- mupdf
32-
ldflags: *ldflags
33-
main: main.go
34-
binary: filebrowser
34+
- musl
3535
goos:
3636
- linux
3737
goarch:
3838
- arm64
3939
hooks:
4040
post:
41-
- upx {{ .Path }} # Compress the binary with UPX
41+
- upx {{ .Path }}
4242

4343
# Build configuration for linux
4444
- id: linux-arm32
@@ -60,8 +60,7 @@ builds:
6060
- id: windows
6161
env:
6262
- CGO_ENABLED=1
63-
- CC=x86_64-w64-mingw32-gcc
64-
- CXX=x86_64-w64-mingw32-g++
63+
- CC=zig cc -target x86_64-windows
6564
tags:
6665
- mupdf
6766
ldflags: *ldflags
@@ -76,17 +75,14 @@ builds:
7675
- upx {{ .Path }} # Compress the binary with UPX
7776

7877
# Build configuration for freebsd without arm & upx
79-
- id: freeBSD
78+
- id: freeBSD and freebsd-arm
8079
ldflags: *ldflags
8180
main: main.go
8281
binary: filebrowser
8382
goos:
8483
- freebsd
8584
goarch:
8685
- amd64
87-
hooks:
88-
post:
89-
- upx {{ .Path }} # Compress the binary with UPX
9086

9187
# Build configuration for macos without upx
9288
- id: macos
@@ -96,11 +92,8 @@ builds:
9692
goos:
9793
- darwin
9894
goarch:
99-
- amd64
10095
- arm64
101-
hooks:
102-
post:
103-
- upx {{ .Path }} # Compress the binary with UPX
96+
- amd64
10497

10598
archives:
10699
- name_template: >
@@ -113,4 +106,3 @@ archives:
113106
114107
checksum:
115108
disable: true
116-

0 commit comments

Comments
 (0)