fix: use docker volume for sqlite db

This commit is contained in:
mini
2026-02-18 17:20:07 +08:00
parent 7fdd181728
commit 96e421730e

View File

@@ -7,9 +7,9 @@ services:
env_file: .env env_file: .env
volumes: volumes:
- /home/xdl/xdl_videos:/home/xdl/xdl_videos - /home/xdl/xdl_videos:/home/xdl/xdl_videos
- ./backend/xdl.db:/app/xdl.db - xdl_data:/app/data
environment: environment:
- DATABASE_URL=sqlite+aiosqlite:///./xdl.db - DATABASE_URL=sqlite+aiosqlite:///./data/xdl.db
frontend: frontend:
build: ./frontend build: ./frontend
@@ -18,3 +18,6 @@ services:
- "127.0.0.1:8580:80" - "127.0.0.1:8580:80"
depends_on: depends_on:
- backend - backend
volumes:
xdl_data: