From 248c9bc278d2e9491c7d5c0328fd835673374312 Mon Sep 17 00:00:00 2001 From: panzerotto Date: Fri, 1 Aug 2025 20:56:48 +0200 Subject: [PATCH] fix db creation --- backend/src/app.py | 2 +- backend/src/connect.py | 2 +- docker-compose.yml | 32 ++++++++++++++++---------------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/backend/src/app.py b/backend/src/app.py index 9dda54a..2df573d 100644 --- a/backend/src/app.py +++ b/backend/src/app.py @@ -45,6 +45,6 @@ def join(): return {"success": True, "ws": f"/ws/{room_id}"} +init_db() if __name__ == "__main__": - init_db() app.run(debug=True) diff --git a/backend/src/connect.py b/backend/src/connect.py index 12e53d8..962528c 100644 --- a/backend/src/connect.py +++ b/backend/src/connect.py @@ -2,5 +2,5 @@ import sqlite3 def get_connection(): - conn = sqlite3.connect("jukebox.db") + conn = sqlite3.connect(".data/jukebox.db") return conn diff --git a/docker-compose.yml b/docker-compose.yml index ea7e2ca..3b05616 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,18 +1,18 @@ services: - backend: - build: ./backend - ports: - - 5001:5000 - environment: - NODE_ENV: development - volumes: - - ./backend:/app - - ./.data/jukebox.sqlite3:/app/.data/jukebox.sqlite3 + backend: + build: ./backend + ports: + - 5001:5000 + environment: + NODE_ENV: development + volumes: + - ./backend:/app + - ./.data:/app/.data - frontend: - build: ./frontend - ports: - - 5173:5173 - volumes: - - ./frontend:/app - - /app/node_modules + frontend: + build: ./frontend + ports: + - 5173:5173 + volumes: + - ./frontend:/app + - /app/node_modules