21 Commits

Author SHA1 Message Date
arian 8e105d8b93 Merge branch 'actions'
Build Debian Package / build (push) Successful in 6s
Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-05-28 19:32:00 -04:00
arian 5acd4ac728 ci(build): add branch and tag triggers for build workflow
Build Debian Package / build (push) Successful in 7s
Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-05-28 19:29:41 -04:00
arian 387c139274 Merge branch 'pr-templates-rm'
Build Debian Package / build (push) Successful in 8s
Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-05-27 18:13:10 -04:00
arian 95556d4d84 refactor(upload): remove unused templates
Build Debian Package / build (push) Successful in 9s
Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-05-27 18:05:06 -04:00
arian a56203f4f5 Merge branch 'actions'
Build Debian Package / build (push) Successful in 6s
Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-05-27 17:44:47 -04:00
arian 67e9ba55bf ci(debian): downgrade upload-artifact action to v3
Build Debian Package / build (push) Successful in 17s
Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-05-27 00:47:09 -04:00
arian 62d70d4726 ci(docker): update build script to copy output from container
Build Debian Package / build (push) Failing after 8s
Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-05-27 00:45:12 -04:00
arian fc162bc6ee Revert "ci(debian): fix permissions issue with deb building workflow"
Build Debian Package / build (push) Successful in 8s
This reverts commit 053be5dbe5.

Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-05-27 00:41:31 -04:00
arian 053be5dbe5 ci(debian): fix permissions issue with deb building workflow
Build Debian Package / build (push) Successful in 8s
Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-05-27 00:34:46 -04:00
arian 310ebfe903 ci(debian): add gitea workflow for automated deb package building
Build Debian Package / build (push) Successful in 1m28s
Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-05-27 00:21:46 -04:00
arian f3743cc9c0 Merge branch 'deb-packaging' 2026-05-25 18:48:04 -04:00
arian 9cc751e694 fix(debian): fix systemd path issue 2026-05-25 18:43:03 -04:00
arian df6a13f978 chore(debian): v0.2.0 changelog added 2026-05-25 18:32:58 -04:00
arian 58a8200968 fix(debian): added dependencies to deb-building Dockerfile for offline installation 2026-05-25 18:15:58 -04:00
arian c7e04d931f fix(debian): fix build dependencies for offline installation 2026-05-25 18:11:13 -04:00
arian 772c8e56ec build(debian): offline pip dependency installation 2026-05-25 18:00:49 -04:00
arian d8af833ce0 chore(deps): bump python dependencies 2026-05-25 17:40:12 -04:00
arian b57dc7d81c docs(license): add MIT license 2026-05-25 17:37:44 -04:00
arian 5fa95f0814 chore(deps): bump python dependencies
Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-05-20 15:44:49 -04:00
arian a64da5ef51 build(docker): implement docker build automation script
Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-05-09 14:46:58 -04:00
arian ec2dfb3491 Merge branch 'docker-build' 2026-05-09 14:38:38 -04:00
13 changed files with 94 additions and 39 deletions
+31
View File
@@ -0,0 +1,31 @@
name: Build Debian Package
on:
push:
branches:
- '**'
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Make scripts executable
run: |
chmod +x release/build-docker.sh
chmod +x release/build-deb.sh
- name: Build Debian Package
run: ./release/build-docker.sh
- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: navidrome-uploader-deb
path: output/*.deb
retention-days: 5
+3 -1
View File
@@ -14,6 +14,8 @@ RUN apt-get update && apt-get install -y \
fakeroot \
python3 \
python3-venv \
python3-pip \
python3-wheel \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build/src
@@ -24,4 +26,4 @@ COPY . .
RUN chmod +x release/build-deb.sh
CMD ["sh", "-c", "./release/build-deb.sh && mv ../*.deb /dist/"]
CMD ["sh", "-c", "./release/build-deb.sh && mv ../*.deb /dist/"]
+9
View File
@@ -0,0 +1,9 @@
MIT License
Copyright (c) 2026 Arian Nasr (arian-nasr) - arian@2ari.ca
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+19
View File
@@ -1,3 +1,22 @@
navidrome-uploader (0.2.0) unstable; urgency=medium
* Packaging:
- Bundle pip wheels during build for offline host installation
- Ensure debian build environment includes pip and wheel modules
* Docker:
- Implement containerized debian packaging automation scripts
* Security:
- Add MAX_CONTENT_LENGTH to prevent upload DoS vectors
* Bug Fixes:
- Fix apt purge leaving pycache and systemd directory remnants
* Frontend:
- Change Dropzone.js upstream source location
* Maintenance:
- Add the open source software MIT license
- Upstream package & dependency updates
-- Arian Nasr <arian@2ari.ca> Mon, 25 May 2026 18:31:00 -0400
navidrome-uploader (0.1.0-2) unstable; urgency=high
* Run pip install stage as navidrome-uploader user instead of root
+2 -2
View File
@@ -8,5 +8,5 @@ Rules-Requires-Root: no
Package: navidrome-uploader
Architecture: all
Depends: ${misc:Depends}, adduser, python3, python3-venv
Description: Navidrome Web Upload Utility
Depends: ${misc:Depends}, adduser, python3, python3-venv, python3-pip, python3-wheel
Description: Navidrome Web Upload Utility
+2 -2
View File
@@ -5,5 +5,5 @@ requirements.txt opt/navidrome-uploader/
templates/* opt/navidrome-uploader/templates/
static/css/* opt/navidrome-uploader/static/css/
static/js/* opt/navidrome-uploader/static/js/
contrib/navidrome-uploader.service lib/systemd/system/navidrome-uploader.service
contrib/navidrome-uploader.service lib/systemd/system/
debian/wheels/* opt/navidrome-uploader/wheels/
+2 -2
View File
@@ -10,8 +10,8 @@ case "$1" in
chown -R "$APP_USER:$APP_USER" "$APP_DIR"
runuser -u "$APP_USER" -- python3 -m venv "$VENV_DIR"
runuser -u "$APP_USER" -- "$VENV_DIR/bin/pip" install --no-cache-dir --upgrade pip
runuser -u "$APP_USER" -- "$VENV_DIR/bin/pip" install --no-cache-dir -r "$APP_DIR/requirements.txt"
runuser -u "$APP_USER" -- "$VENV_DIR/bin/pip" install --no-cache-dir --no-index --find-links="$APP_DIR/wheels" -r "$APP_DIR/requirements.txt"
if command -v systemctl >/dev/null 2>&1; then
systemctl daemon-reload || true
+5
View File
@@ -3,6 +3,11 @@
%:
dh $@
override_dh_auto_build:
dh_auto_build
mkdir -p debian/wheels
python3 -m pip wheel --no-cache-dir -r requirements.txt pip -w debian/wheels
override_dh_install:
dh_install
install -d debian/navidrome-uploader/etc/default/navidrome-uploader
+5 -3
View File
@@ -3,7 +3,7 @@
# March 6, 2026
import os
from flask import Flask, request, render_template
from flask import Flask, request, render_template, jsonify
from werkzeug.utils import secure_filename
UPLOAD_FOLDER = os.environ.get('NAVIDROME_MUSIC_FOLDER', '/opt/navidrome/music')
@@ -25,13 +25,15 @@ def ping():
@app.route('/', methods=['GET', 'POST'])
def upload_file():
if request.method == 'POST':
uploaded_count = 0
for key, file in request.files.items():
if key.startswith('file') and file and allowed_file(file.filename) and file.filename != '':
filename = secure_filename(file.filename)
file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename))
uploaded_count += 1
else:
return render_template('error.html', error_message=f'File is not allowed.'), 400
return jsonify({"error": f"File '{file.filename}' is not allowed or is empty."}), 400
return render_template('success.html', success_message=f'{len(request.files)} file(s) uploaded successfully!'), 200
return jsonify({"message": f"{uploaded_count} file(s) uploaded successfully!"}), 200
return render_template('index.html'), 200
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
set -eu
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
PROJECT_ROOT="$(CDPATH= cd -- "${SCRIPT_DIR}/.." && pwd)"
cd "${PROJECT_ROOT}"
docker build --platform linux/amd64 -t uploader-builder -f Dockerfile.build .
docker run --name uploader-builder-container --platform linux/amd64 uploader-builder
docker cp uploader-builder-container:/dist/. output/
docker rm uploader-builder-container
+1 -1
View File
@@ -1,5 +1,5 @@
blinker==1.9.0
click==8.3.3
click==8.4.1
Flask==3.1.3
itsdangerous==2.2.0
Jinja2==3.1.6
-14
View File
@@ -1,14 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Error - Upload Music</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" type="text/css" />
</head>
<body>
<h1>Error</h1>
<p>{{ error_message }}</p>
<a href="/"><button>Upload another file</button></a>
</body>
</html>
-14
View File
@@ -1,14 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Success - Upload Music</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" type="text/css" />
</head>
<body>
<h1>Success</h1>
<p>{{ success_message }}</p>
<a href="/"><button>Upload another file</button></a>
</body>
</html>