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:
parent
a94cf6fe1e
commit
1e3fc4285d
2 changed files with 3 additions and 3 deletions
|
|
@ -3,7 +3,7 @@ services:
|
|||
build: .
|
||||
env_file: .env
|
||||
volumes:
|
||||
- db:/app/db.sqlite3
|
||||
- db:/app/data
|
||||
- media:/app/media
|
||||
- static:/app/staticfiles
|
||||
expose:
|
||||
|
|
@ -17,7 +17,7 @@ services:
|
|||
nginx:
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- "80:80"
|
||||
- "8083:80"
|
||||
volumes:
|
||||
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
- media:/app/media:ro
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ WSGI_APPLICATION = 'plantdb.wsgi.application'
|
|||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
'NAME': BASE_DIR / 'data' / 'db.sqlite3',
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue