Merge branch 'main' of https://github.com/DumbWareio/DumbDrop into dev, add dev branch push to dockerhub

This commit is contained in:
greirson
2025-05-05 16:53:58 -07:00
3 changed files with 12 additions and 6 deletions

View File

@@ -4,6 +4,7 @@ on:
push: push:
branches: branches:
- main # Trigger the workflow on pushes to the main branch - main # Trigger the workflow on pushes to the main branch
- dev # Trigger the workflow on pushes to the dev branch
jobs: jobs:
build-and-push: build-and-push:
@@ -39,6 +40,8 @@ jobs:
images: | images: |
name=dumbwareio/dumbdrop name=dumbwareio/dumbdrop
tags: | tags: |
# Add :dev tag for pushes to the dev branch
type=raw,value=dev,enable=${{ github.ref == 'refs/heads/dev' }}
# the semantic versioning tags add "latest" when a version tag is present # the semantic versioning tags add "latest" when a version tag is present
# but since version tags aren't being used (yet?) let's add "latest" anyway # but since version tags aren't being used (yet?) let's add "latest" anyway
type=raw,value=latest type=raw,value=latest

View File

@@ -51,6 +51,15 @@ app.get('/', (req, res) => {
return res.redirect('/login.html'); return res.redirect('/login.html');
} }
let html = fs.readFileSync(path.join(__dirname, '../public', 'index.html'), 'utf8');
html = html.replace(/{{SITE_TITLE}}/g, config.siteTitle);
html = html.replace('{{AUTO_UPLOAD}}', config.autoUpload.toString());
html = html.replace('{{MAX_RETRIES}}', config.clientMaxRetries.toString());
// Ensure baseUrl has a trailing slash for correct asset linking
const baseUrlWithSlash = config.baseUrl.endsWith('/') ? config.baseUrl : config.baseUrl + '/';
html = html.replace(/{{BASE_URL}}/g, baseUrlWithSlash);
html = injectDemoBanner(html);
res.send(html);
try { try {
let html = fs.readFileSync(path.join(__dirname, '../public', 'index.html'), 'utf8'); let html = fs.readFileSync(path.join(__dirname, '../public', 'index.html'), 'utf8');

View File

@@ -11,12 +11,6 @@ console.log('Loaded ENV:', {
LOCAL_UPLOAD_DIR: process.env.LOCAL_UPLOAD_DIR, LOCAL_UPLOAD_DIR: process.env.LOCAL_UPLOAD_DIR,
NODE_ENV: process.env.NODE_ENV NODE_ENV: process.env.NODE_ENV
}); });
console.log('Loaded ENV:', {
PORT: process.env.PORT,
UPLOAD_DIR: process.env.UPLOAD_DIR,
LOCAL_UPLOAD_DIR: process.env.LOCAL_UPLOAD_DIR,
NODE_ENV: process.env.NODE_ENV
});
const { validatePin } = require('../utils/security'); const { validatePin } = require('../utils/security');
const logger = require('../utils/logger'); // Use the default logger instance const logger = require('../utils/logger'); // Use the default logger instance
const fs = require('fs'); const fs = require('fs');