MASCOT UPDATE
Package Release Number better licence image Shrunk image Fixed size
This commit is contained in:
parent
05a1723805
commit
c88cebd8b1
10 changed files with 42 additions and 6 deletions
|
|
@ -35,12 +35,15 @@ RUN echo "Building Linux binary..." && \
|
||||||
|
|
||||||
# Build Windows binary
|
# Build Windows binary
|
||||||
RUN echo "Building Windows binary..." && \
|
RUN echo "Building Windows binary..." && \
|
||||||
|
echo 'IDI_ICON1 ICON "./app/gopherbook/static/images/favicon/favicon.ico"' > gopherbook.rc && \
|
||||||
|
x86_64-w64-mingw32-windres gopherbook.rc -o ./app/gopherbook/gopherbook.syso && \
|
||||||
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc go build \
|
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc go build \
|
||||||
-a \
|
-a \
|
||||||
-ldflags="-s -w" \
|
-ldflags="-s -w" \
|
||||||
-trimpath \
|
-trimpath \
|
||||||
-o bin/gopherbook-windows.exe ./app/gopherbook && \
|
-o bin/gopherbook-windows.exe ./app/gopherbook && \
|
||||||
upx --best --ultra-brute bin/gopherbook-windows.exe
|
upx --best --ultra-brute bin/gopherbook-windows.exe && \
|
||||||
|
rm ./app/gopherbook/gopherbook.syso gopherbook.rc
|
||||||
|
|
||||||
# Verify binaries were created
|
# Verify binaries were created
|
||||||
RUN ls -lh bin/ && \
|
RUN ls -lh bin/ && \
|
||||||
|
|
|
||||||
2
Makefile
2
Makefile
|
|
@ -2,4 +2,4 @@ build:
|
||||||
go build -o bin/main ./app/gopherbook
|
go build -o bin/main ./app/gopherbook
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf watch etc library cache
|
rm -rf watch etc library cache binaries releases
|
||||||
|
|
|
||||||
14
README.md
14
README.md
|
|
@ -1,11 +1,21 @@
|
||||||
# Gopherbook – Self-Hosted Comic Library & CBZ/CBT Reader
|
<div align="center">
|
||||||
|
|
||||||
|
<img src="docs/images/gopherbook-title.png" alt="Description" width="50%">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|
## Self-Hosted Comic Library & CBZ/CBT Reader
|
||||||
|
|
||||||
Gopherbook is a lightweight, single-binary, self-hosted web comic reader and library manager written in Go.
|
Gopherbook is a lightweight, single-binary, self-hosted web comic reader and library manager written in Go.
|
||||||
It is designed for people who want full control over their digital comic collection (CBZ/CBT files), including support for password-protected/encrypted archives, per-user libraries, tagging, automatic organization, and a clean modern reader.
|
It is designed for people who want full control over their digital comic collection (CBZ/CBT files), including support for password-protected/encrypted archives, per-user libraries, tagging, automatic organization, and a clean modern reader.
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ import (
|
||||||
"regexp"
|
"regexp"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
"io/fs"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
@ -39,6 +40,9 @@ import (
|
||||||
//go:embed templates/index.html
|
//go:embed templates/index.html
|
||||||
var templateFS embed.FS
|
var templateFS embed.FS
|
||||||
|
|
||||||
|
//go:embed all:static
|
||||||
|
var staticFS embed.FS
|
||||||
|
|
||||||
// ComicInfo represents the standard ComicInfo.xml metadata
|
// ComicInfo represents the standard ComicInfo.xml metadata
|
||||||
type ComicInfo struct {
|
type ComicInfo struct {
|
||||||
XMLName xml.Name `xml:"ComicInfo"`
|
XMLName xml.Name `xml:"ComicInfo"`
|
||||||
|
|
@ -135,6 +139,14 @@ func main() {
|
||||||
|
|
||||||
loadUsers()
|
loadUsers()
|
||||||
initWatchFolders()
|
initWatchFolders()
|
||||||
|
// Create static sub-filesystem once
|
||||||
|
staticSubFS, err := fs.Sub(staticFS, "static")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(fmt.Errorf("failed to create static sub-filesystem: %w", err))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create handlers once and reuse
|
||||||
|
staticHandler := http.FileServer(http.FS(staticSubFS))
|
||||||
|
|
||||||
http.HandleFunc("/api/register", handleRegister)
|
http.HandleFunc("/api/register", handleRegister)
|
||||||
http.HandleFunc("/api/login", handleLogin)
|
http.HandleFunc("/api/login", handleLogin)
|
||||||
|
|
@ -154,6 +166,7 @@ func main() {
|
||||||
http.HandleFunc("/api/admin/delete-comic/", authMiddleware(handleDeleteComic))
|
http.HandleFunc("/api/admin/delete-comic/", authMiddleware(handleDeleteComic))
|
||||||
http.HandleFunc("/api/watch-folder", authMiddleware(handleWatchFolder))
|
http.HandleFunc("/api/watch-folder", authMiddleware(handleWatchFolder))
|
||||||
http.HandleFunc("/", serveUI)
|
http.HandleFunc("/", serveUI)
|
||||||
|
http.Handle("/static/", http.StripPrefix("/static/", staticHandler))
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
for {
|
for {
|
||||||
|
|
|
||||||
BIN
app/gopherbook/static/images/favicon/favicon.ico
(Stored with Git LFS)
Normal file
BIN
app/gopherbook/static/images/favicon/favicon.ico
(Stored with Git LFS)
Normal file
Binary file not shown.
|
|
@ -3,6 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link href="/static/images/favicon/favicon.ico" rel="shortcut icon" type="image/x-icon">
|
||||||
<title>Gopherbook</title>
|
<title>Gopherbook</title>
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
|
|
|
||||||
BIN
docs/images/gopherbook-title.png
(Stored with Git LFS)
Normal file
BIN
docs/images/gopherbook-title.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
docs/images/svgs/PIL.svg
(Stored with Git LFS)
Normal file
BIN
docs/images/svgs/PIL.svg
(Stored with Git LFS)
Normal file
Binary file not shown.
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
VERSION="${1:-v1.1.000}"
|
VERSION="${1:-v1.2.000}"
|
||||||
RELEASE_DIR="./releases"
|
RELEASE_DIR="./releases"
|
||||||
BINARIES_DIR="./binaries"
|
BINARIES_DIR="./binaries"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,6 @@ echo "Cleaning up old images..."
|
||||||
podman image prune --force
|
podman image prune --force
|
||||||
|
|
||||||
echo "Update and cleanup complete!"
|
echo "Update and cleanup complete!"
|
||||||
echo "Container is running with memory limit: 512MB, swap: 512MB"
|
echo "Container is running with memory limit: 512MB"
|
||||||
echo "Go memory limit (GOMEMLIMIT): 512MiB"
|
echo "Go memory limit (GOMEMLIMIT): 512MiB"
|
||||||
echo "Aggressive GC enabled (GOGC=50)"
|
echo "Aggressive GC enabled (GOGC=50)"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue