22 Commits

Author SHA1 Message Date
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
arian 3dec409169 build(docker): implement containerized debian packaging
Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-05-09 14:35:51 -04:00
arian 4130cc4269 chore(deps): bump gunicorn==26.0.0 2026-05-09 13:42:51 -04:00
arian 0893d21ded perf(upload) add MAX_CONTENT_LENGTH to prevent DoS 2026-05-01 06:30:12 -04:00
arian 4278fd530d chore: bump pip==26.1 2026-04-26 23:16:27 -04:00
arian 483b0fd7b0 bump packaging==26.2 2026-04-26 23:13:11 -04:00
arian c7f2c99c6b chore: bump click==8.3.3 2026-04-22 19:58:48 -04:00
arian 1d3ae30cc9 pin addl. pypi packages 2026-04-21 14:37:35 -04:00
arian 8b30c88a6a Merge branch 'pr-apt-purge-fix' 2026-04-16 11:58:56 -04:00
arian 0fc4717a05 fix: apt purge leaving pycache & warning systemd folder not empty 2026-04-16 11:57:25 -04:00
arian 2e68ad7323 v0.1.0-2 changelog 2026-04-14 12:14:13 -04:00
arian 792465dab2 run deb package pip install stage as navidrome-uploader user instead of root 2026-04-14 12:09:54 -04:00
arian 7f06ffe6d7 disable gunicorn control socket in service & patch notes 2026-04-09 02:01:06 -04:00
14 changed files with 112 additions and 17 deletions
+2 -1
View File
@@ -4,4 +4,5 @@ navidrome-upload.service
.idea/
.env
/README.md
__pycache__/
__pycache__/
*.deb
+29
View File
@@ -0,0 +1,29 @@
# Navidome-Uploader Dockerfile for building .deb packages
# Arian Nasr
# May 9, 2026
FROM debian:13-slim
# Prevent interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
build-essential \
debhelper \
devscripts \
fakeroot \
python3 \
python3-venv \
python3-pip \
python3-wheel \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build/src
RUN mkdir -p /dist
COPY . .
RUN chmod +x release/build-deb.sh
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.
+1 -1
View File
@@ -9,7 +9,7 @@ Group=navidrome-uploader
WorkingDirectory=/opt/navidrome-uploader
Environment="PATH=/opt/navidrome-uploader/venv/bin"
EnvironmentFile=/etc/default/navidrome-uploader/.env
ExecStart=/opt/navidrome-uploader/venv/bin/gunicorn -c gunicorn.conf.py main:app
ExecStart=/opt/navidrome-uploader/venv/bin/gunicorn --no-control-socket -c gunicorn.conf.py main:app
Restart=on-failure
RestartSec=30
+31
View File
@@ -1,3 +1,34 @@
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
-- Arian Nasr <arian@2ari.ca> Tue, 14 Apr 2026 12:11:00 -0400
navidrome-uploader (0.1.0-1) unstable; urgency=medium
* Disable gunicorn control socket in systemd service unit
-- Arian Nasr <arian@2ari.ca> Thu, 09 Apr 2026 01:58:00 -0400
navidrome-uploader (0.1.0) unstable; urgency=medium
* Add Debian packaging with systemd service integration and venv setup.
+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
+1 -1
View File
@@ -6,4 +6,4 @@ 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/
debian/wheels/* opt/navidrome-uploader/wheels/
+14 -10
View File
@@ -3,20 +3,24 @@ set -e
APP_DIR="/opt/navidrome-uploader"
VENV_DIR="${APP_DIR}/venv"
APP_USER="navidrome-uploader"
case "$1" in
configure)
python3 -m venv "${VENV_DIR}"
"${VENV_DIR}/bin/pip" install --no-cache-dir --upgrade pip
"${VENV_DIR}/bin/pip" install --no-cache-dir -r "${APP_DIR}/requirements.txt"
configure)
chown -R "$APP_USER:$APP_USER" "$APP_DIR"
if command -v systemctl > /dev/null 2>&1; then
systemctl daemon-reload || true
systemctl enable navidrome-uploader.service || true
systemctl restart navidrome-uploader.service || true
fi
;;
runuser -u "$APP_USER" -- python3 -m venv "$VENV_DIR"
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
systemctl enable navidrome-uploader.service || true
systemctl restart navidrome-uploader.service || true
fi
;;
esac
exit 0
+1
View File
@@ -8,6 +8,7 @@ fi
if [ "$1" = "purge" ]; then
rm -rf /etc/default/navidrome-uploader
rm -rf /opt/navidrome-uploader/venv
rm -rf /opt/navidrome-uploader/__pycache__
fi
exit 0
+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
+2
View File
@@ -8,9 +8,11 @@ from werkzeug.utils import secure_filename
UPLOAD_FOLDER = os.environ.get('NAVIDROME_MUSIC_FOLDER', '/opt/navidrome/music')
ALLOWED_EXTENSIONS = {'flac', 'mp3', 'wav'}
MAX_CONTENT_LENGTH = 500 * 1024 * 1024
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
app.config['MAX_CONTENT_LENGTH'] = MAX_CONTENT_LENGTH
def allowed_file(filename):
return '.' in filename and \
View File
+11
View File
@@ -0,0 +1,11 @@
#!/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 --rm --platform linux/amd64 -v "$(pwd)/output:/dist" uploader-builder
+4 -2
View File
@@ -1,8 +1,10 @@
blinker==1.9.0
click==8.3.2
click==8.4.1
Flask==3.1.3
itsdangerous==2.2.0
Jinja2==3.1.6
MarkupSafe==3.0.3
Werkzeug==3.1.8
gunicorn==25.3.0
gunicorn==26.0.0
pip==26.1.1
packaging==26.2