Skip to content

Commit 49b670c

Browse files
author
SM_SAYEED
committed
rendering from DB removed
1 parent 7cedb87 commit 49b670c

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ COPY . /app
44
RUN pip install --no-cache-dir -r requirements.txt
55
ENV PORT 8080
66
EXPOSE 8080
7-
CMD ["python", "app.py"]
7+
CMD ["gunicorn", "-b", "0.0.0.0:8080", "app:app"]

app.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -441,16 +441,8 @@ def public_clips():
441441
except Exception as e:
442442
print("🚫 Error reading CSV:", e)
443443

444-
# -- 2. Add any admin-uploaded clips stored in the database
445-
try:
446-
with sqlite3.connect(DB_NAME) as conn:
447-
c = conn.cursor()
448-
c.execute("SELECT filename, title, description FROM music_clips ORDER BY id DESC")
449-
for filename, title, description in c.fetchall():
450-
url = url_for('uploaded_file', filename=filename)
451-
clips.append((url, url, title or '', description or ''))
452-
except Exception as e:
453-
print("🚫 Error reading from music_clips DB:", e)
444+
445+
pass
454446

455447
return render_template('clips.html', clips=clips, admin=admin)
456448

@@ -632,8 +624,6 @@ def extract_drive_id(link):
632624
auto_import_uploads()
633625
auto_log_material_files()
634626

635-
636627
# ========== MAIN ==========
637628
if __name__ == '__main__':
638-
app.run(host='0.0.0.0', port=8080)
639-
629+
app.run(host='0.0.0.0', port=8080)

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ pytz==2025.2
1212
six==1.17.0
1313
tzdata==2025.2
1414
Werkzeug==3.1.3
15+
gunicorn==21.2.0

0 commit comments

Comments
 (0)