Skip to content

Commit 04e33a7

Browse files
committed
more fixes
1 parent 622933a commit 04e33a7

2 files changed

Lines changed: 103 additions & 7 deletions

File tree

docs/faq_troubleshooting.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,91 @@ Another way to see this screen is to use the command: `php artisan lychee:diagno
88

99
Lychee v7 with FrankenPHP requires a container restart to take into account changes made to the `.env` file.
1010

11+
### My Docker container keeps restarting, what can I do?
12+
13+
If your Lychee Docker container is continuously restarting, the most common cause is a missing or improperly configured `APP_KEY`.
14+
15+
Verify that you have `APP_KEY` properly set in your `.env` file or `docker-compose.yml`. If the key is missing or invalid, you can generate a new one by running:
16+
17+
```bash
18+
echo "APP_KEY=base64:$(openssl rand -base64 32)"
19+
```
20+
21+
Copy the generated key and add it to your `.env` file or Docker Compose configuration, then restart the container.
22+
23+
### My workers are not processing jobs, what should I check?
24+
25+
If background job processing is not working in your Docker setup, verify the following settings:
26+
27+
1. Ensure `QUEUE_CONNECTION=database` is set in both the API and worker services
28+
2. Verify `LYCHEE_MODE=worker` is set in the worker service configuration
29+
3. Check the worker logs for any errors:
30+
31+
```bash
32+
docker-compose logs -f lychee_worker
33+
```
34+
35+
Review the logs for any error messages that might indicate configuration issues or connection problems.
36+
37+
### I'm having upload issues with Docker, what can I do?
38+
39+
Upload problems in Docker deployments are typically related to volume mounting or permissions:
40+
41+
1. Verify that your volume mounts point to the correct paths in your `docker-compose.yml`
42+
2. Check that file permissions on host directories allow the container user to write
43+
3. Ensure the uploads directory (typically `./lychee/uploads`) exists on the host and is writable
44+
45+
You can check directory permissions on your host system with:
46+
47+
```bash
48+
ls -la ./lychee/
49+
```
50+
51+
If needed, adjust permissions to allow the container to write to the uploads directory.
52+
53+
### I'm experiencing performance issues with Docker, what should I check?
54+
55+
If your Dockerized Lychee instance is running slowly, consider the following:
56+
57+
1. Add worker services for background processing of resource-intensive tasks
58+
2. Verify FrankenPHP is running correctly (you should see FrankenPHP mentioned in the logs, not nginx)
59+
3. Ensure `QUEUE_CONNECTION` is set to enable asynchronous job processing
60+
61+
You can check your container logs to verify FrankenPHP is active:
62+
63+
```bash
64+
docker-compose logs lychee
65+
```
66+
67+
### I'm getting database connection errors in Docker, what can I do?
68+
69+
Database connection issues in Docker are usually related to service configuration:
70+
71+
1. Ensure the database service name in your `docker-compose.yml` matches the `DB_HOST` value in your configuration
72+
2. Verify database credentials (`DB_USERNAME`, `DB_PASSWORD`, `DB_DATABASE`) are correct and match between services
73+
3. Check that the database service is healthy and running:
74+
75+
```bash
76+
docker-compose ps lychee_db
77+
```
78+
79+
If the database service shows as unhealthy or restarting, check its logs for more details:
80+
81+
```bash
82+
docker-compose logs lychee_db
83+
```
84+
85+
### Since upgrading to Lychee v7, all my thumbnails are missing, what can I do?
86+
87+
After upgrading to Lychee v7, if your thumbnails are missing, you may need to regenerate them. You can do this by running the following Artisan command inside your Lychee container:
88+
89+
```bash
90+
docker exec -it lychee php artisan lychee:recompute-album-sizes
91+
docker exec -it lychee php artisan lychee:recompute-album-stats
92+
```
93+
94+
Or log into the web interface and go to Settings ⇒ Maintenance ⇒ Album Precomputed Fields.
95+
1196
### When I do X, I get an error API not found, what can I do?
1297

1398
Open the dev modules of your browser (usually by pressing `F12`) and open the Network tab.

docs/upgrade.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,14 @@ Version 7 marks a fundamental shift in Lychee's Docker architecture:
1616
Do note that this change also has consequences in the way Lychee reads your `.env`
1717
file. Updating values in the `.env` file will now require a container restart to take effect.
1818

19+
### Port change
20+
21+
Version 7 uses FrankenPHP which listens on port `8000` instead of the previous `80` used by nginx. Make sure to update your port mappings accordingly in your `docker-compose.yml`.
22+
1923
### Volume Mount Changes
2024

25+
In order to avoid you running into issues while booting version 7, we are blocking the startup of the container if the old volume structure is detected.
26+
2127
#### Version 6 Volume Structure (OLD)
2228
```yaml
2329
volumes:
@@ -32,19 +38,19 @@ volumes:
3238
```yaml
3339
volumes:
3440
- ./lychee/uploads:/app/public/uploads
35-
- ./lychee/storage/app:/app/storage/app
3641
- ./lychee/logs:/app/storage/logs
3742
- ./lychee/tmp:/app/storage/tmp # so that uploads are not filling up the memory of the container
38-
- ./lychee/conf/.env:/app/.env
39-
- ./conf/user.css:/app/public/dist/user.css # optional
40-
- ./conf/custom.js:/app/public/dist/custom.js # optional
43+
- ./lychee/conf/.env:/app/.env # OPTIONAL, you can manage your .env directly as variables in docker-compose.yml
44+
- ./lychee/storage/app:/app/storage/app # OPTIONAL: for persistent storage of app data
45+
- ./conf/user.css:/app/public/dist/user.css # OPTIONAL
46+
- ./conf/custom.js:/app/public/dist/custom.js # OPTIONAL
4147
```
4248
43-
> {note} Notice the key changes: uploads are now at `/app/public/uploads`, storage at `/app/storage/app`, tmp at `/app/storage/tmp`, and the `.env` file is mounted read-only.
49+
> {note} Notice the key changes: uploads are now at `/app/public/uploads`, logs at `/app/storage/logs`, tmp at `/app/storage/tmp`, and the `.env` file.
4450

4551
The `/sym` volume has been removed as Lychee no longer uses symbolic links for storage. This was a security feature that originated from version 4, but is no longer necessary as the functionality has been removed.
4652

47-
**Important:** With the 3 volumes under `/app/storage`, you may think you could simplify the configuration by specifying one single volume for `/app/storage` instead. This is incorrect. Doing so will make the app exit with the error "The `/app/bootstrap/cache` directory must be present and writable."
53+
**Important:** With multiple volumes under `/app/storage`, you may think you could simplify the configuration by specifying one single volume for `/app/storage` instead. This is incorrect. Doing so will make the app exit with the error "The `/app/bootstrap/cache` directory must be present and writable."
4854

4955
### Service Architecture Changes
5056

@@ -235,14 +241,19 @@ docker-compose logs -f lychee
235241

236242
You will notice that after the upgrade, thumbnails are missing. You can regenerate them by running:
237243
```bash
238-
docker exec -it lychee php artisan lychee:backfill-album-fields
244+
docker exec -it lychee php artisan lychee:recompute-album-sizes
245+
docker exec -it lychee php artisan lychee:recompute-album-stats
239246
```
240247

241248
or by logging into the web interface and going to Settings ⇒ Maintenance ⇒ Album Precomputed Fields.
242249

243250

244251
### Troubleshooting
245252

253+
**Container keeps restarting**
254+
255+
- Verify that you have APP_KEY properly set in your `.env` or `docker-compose.yml` if that is not the case you can run `echo "APP_KEY=base64:$(openssl rand -base64 32)"` to create a new one.
256+
246257
**Workers not processing jobs**
247258
- Verify `QUEUE_CONNECTION=database` is set in both API and worker services
248259
- Verify `LYCHEE_MODE=worker` is set in worker service

0 commit comments

Comments
 (0)