fix: use data/ subdir for SQLite volume mount in Docker

Named volumes can't mount to a file path — use a directory.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Stephan Kerkman 2026-05-28 10:11:53 +02:00
parent a94cf6fe1e
commit 1e3fc4285d
2 changed files with 3 additions and 3 deletions

View file

@ -3,7 +3,7 @@ services:
build: . build: .
env_file: .env env_file: .env
volumes: volumes:
- db:/app/db.sqlite3 - db:/app/data
- media:/app/media - media:/app/media
- static:/app/staticfiles - static:/app/staticfiles
expose: expose:
@ -17,7 +17,7 @@ services:
nginx: nginx:
image: nginx:alpine image: nginx:alpine
ports: ports:
- "80:80" - "8083:80"
volumes: volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro - ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- media:/app/media:ro - media:/app/media:ro

View file

@ -52,7 +52,7 @@ WSGI_APPLICATION = 'plantdb.wsgi.application'
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.sqlite3', 'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3', 'NAME': BASE_DIR / 'data' / 'db.sqlite3',
} }
} }