-
|
Hi, I'm using docker compose to run lychee. I followed your instructions to upgrade from v6 to v7 but I have an error connecting to my sql-lite database lychee | 🚀 Starting Lychee entrypoint...
lychee | 🔍 Validating environment variables...
lychee | ✅ Valid database connection type: sqlite
lychee | ✅ Valid environment: production
lychee | ✅ Core variables validated
lychee | 🎉 Environment validation complete!
lychee | Validating and setting PUID/PGID
lychee | User UID: 33
lychee | User GID: 33
lychee | 🔍 Validating permissions...
lychee | ⏰ Set Permissions for Lychee folders...
lychee | ✅ Permissions set securely
lychee | ⏰ Set Permissions for Upload/dist folders (this may take a while)...
lychee | ✅ Permissions set securely
lychee | Checking RUN_AS_ROOT setting
lychee | ✅ Will drop privileges to www-data user
lychee | 🧹 Clearing bootstrap cache...
lychee | 🌐 Starting Lychee in web mode...
lychee | 🔄 Running database migrations...
lychee |
lychee | INFO Running migrations.
lychee |
lychee | 2025_12_15_161819_webshop_level_2 .............................. 0.80ms FAIL
lychee |
lychee | In Connection.php line 831:
lychee |
lychee | SQLSTATE[HY000]: General error: 8 attempt to write a readonly database (Con
lychee | nection: sqlite, Database: /conf/lychee.db, SQL: update "configs" set "leve
lychee | l" = 2 where "key" LIKE webshop_%)
lychee |
lychee |
lychee | In Connection.php line 602:
lychee |
lychee | SQLSTATE[HY000]: General error: 8 attempt to write a readonly database
lychee |
lychee |
lychee exited with code 1 (restarting)My compose file services:
lychee:
image: lycheeorg/lychee:latest
container_name: lychee
ports:
- "8081:8000"
environment:
- DB_CONNECTION=sqlite
- DB_DATABASE=/conf/lychee.db
- APP_ENV=production
- APP_DEBUG=false
- APP_URL=xxx
- APP_KEY=xxx
- APP_FORCE_HTTPS=true
- PHP_TZ=Europe/Berlin
- TIMEZONE=Europe/Berlin
- TRUSTED_PROXIES=*
volumes:
- ./uploads:/app/public/uploads
- ./logs:/app/storage/logs
- ./tmp:/app/storage/tmp
- ./storage/app:/app/storage/app
- ./conf/lychee.db:/conf/lychee.dbThe database is in the same place like before. I've tried to move it to /storage/app and change the paths but same error. I did not change anything about permissions to the actual database. Can you guide me in the correct direction please? Thanks! Spindev |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 12 replies
-
Your database need to be writable by the PUID/GUID that you assigned in your docker compose (in this case it should be 33:33)
|
Beta Was this translation helpful? Give feedback.
okay let's try the worst case ...
can you set
RUN_AS_ROOT=yesin your env ?