Skip to content

Commit 90bb0b4

Browse files
authored
Fix advanced installation page. (#106)
1 parent 8f974bb commit 90bb0b4

File tree

1 file changed

+31
-28
lines changed

1 file changed

+31
-28
lines changed

docs/advanced-setups.md

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -233,66 +233,66 @@ s3fs makes you operate files and directories in S3 bucket like a local file syst
233233

234234
[s3fs-fuse - Instructions from developer](https://github.com/s3fs-fuse/s3fs-fuse)
235235

236-
```
236+
```bash
237237
sudo dnf install s3fs-fuse
238238
sudo echo ACCESS_KEY_ID:SECRET_ACCESS_KEY > /etc/passwd-s3fs
239239
sudo chmod 600 /etc/passwd-s3fs
240240
```
241241

242242
**Configure SELinux to allow access to the new filesystem**
243243

244-
```
244+
```bash
245245
setsebool -P httpd_use_fusefs 1
246246
```
247247

248248
**Setup a permanent mounting point**
249249

250250
Create S3 Object mount point:
251251

252-
```
252+
```bash
253253
sudo mkdir /mnt/bucket
254254
```
255255

256-
Edit fstab to create a new mount on boot:
257-
258-
```
259-
Add the following line to: /etc/fstab
260-
256+
Edit fstab to create a new mount on boot:
257+
Add the following line to: `/etc/fstab`
258+
```bash
261259
<bucket> /mnt/bucket fuse.s3fs _netdev, allow_other, enable_noobj_cache, url=<s3_endpoint>, use_cache="", passwd_file=/etc/passwd-s3fs, mp_umask=0002 0 0
262260
```
263261

264-
Example:
265-
<bucket> mybucket (name used in your cloud provider)
266-
<s3_endpoint> https://eu-central-1.linodeobjects.com
262+
Example:
267263

268-
Parameters are explained below:
269-
allow_other Allow other users to access the bucket
270-
mp_umask Mask permissions for mount point
271-
enable_noobj_cache Performance improvement - Enable when bucket is exclusively used by s3fs
272-
use_cache="" Disabled
273-
use_cache=/var/cache/s3fs Enabled (to be used with care, because the cache can grow out of control. Also, I haven't noticed much difference using it)
274-
264+
- <bucket> mybucket (name used in your cloud provider)
265+
- <s3_endpoint> https://eu-central-1.linodeobjects.com
275266

276-
Reboot your server to confirm S3 Object Storage is mounted correctly.
267+
Parameters are explained below:
277268

278-
Create Lychee's mount point:
269+
- `allow_other` Allow other users to access the bucket
270+
- `mp_umask` Mask permissions for mount point
271+
- `enable_noobj_cache` Performance improvement - Enable when bucket is exclusively used by s3fs
272+
- `use_cache=""` Disabled
273+
- `use_cache=/var/cache/s3fs` Enabled (to be used with care, because the cache can grow out of control. Also, I haven't noticed much difference using it)
274+
279275

280-
```
276+
Reboot your server to confirm S3 Object Storage is mounted correctly.
277+
Create Lychee's mount point:
278+
```bash
281279
sudo mkdir /mnt/bucket/uploads
282280
```
283281

284282
### Create and run Lychee container
285-
From now on, Lychee will see the Object Storage mount transparently like any other mount. The container's volume `/uploads` needs to point to the new created mount:
283+
From now on, Lychee will see the Object Storage mount transparently like any other mount.
284+
The container's volume `/uploads` needs to point to the new created mount:
286285

287-
```
286+
```bash
288287
sudo podman run --rm -d --name myphotos -v /mnt/bucket/uploads:/uploads -e PUID=33 -e PGID=1000 ... docker.io/lycheeorg/lychee
289288
```
290289

291290
### Configure .ENV
292291
To avoid latency when clicking Diagnostics, my suggestion is to disable BasicPermissionCheck. Otherwise, depending on the number of photos in your gallery, this task can take hours.
293292

294-
```/var/lib/containers/storage/volumes/lychee-conf/_data/.env
295-
SKIP_DIAGNOSTICS_CHECKS=BasicPermissionCheck
293+
```bash
294+
# /var/lib/containers/storage/volumes/lychee-conf/_data/.env
295+
SKIP_DIAGNOSTICS_CHECKS=BasicPermissionCheck
296296
```
297297

298298
### Limitations to be considered
@@ -321,15 +321,17 @@ sudo chown -R www-data:www-data /var/www/Lychee
321321
sudo chmod -R 2775 /var/www/Lychee
322322
```
323323

324-
Install composer in `/var/www/Lychee` as instructed in [here](https://getcomposer.org/download/). Then, from `/var/www/Lychee`, install the project dependencies:
324+
Install composer in `/var/www/Lychee` as instructed in [here](https://getcomposer.org/download/).
325+
Then, from `/var/www/Lychee`, install the project dependencies:
325326

326327
```bash
327328
sudo -u www-data php composer.phar install --no-dev
328329
```
329330

330331
### Setup Apache
331332

332-
Link `https://my.url/photos/` to `/var/www/Lychee/public` by adding the following to your Apache configuration for Aliases. In Apache 2.4 running on Debian, the correct configuration file is `/etc/apache2/mods-available/alias.conf`.
333+
Link `https://my.url/photos/` to `/var/www/Lychee/public` by adding the following to your Apache configuration for Aliases.
334+
In Apache 2.4 running on Debian, the correct configuration file is `/etc/apache2/mods-available/alias.conf`.
333335

334336
```apacheconf
335337
Alias /photos /var/www/Lychee/public
@@ -349,7 +351,8 @@ sudo service apache2 restart
349351

350352
### Configure Lychee
351353

352-
At this point, you should be able to go to `https://my.url/photos/` and run the web installer. During the installation procedure, on top of adding the database credentials to match your setup, set your `APP_URL` to the served subdirectory:
354+
At this point, you should be able to go to `https://my.url/photos/` and run the web installer.
355+
During the installation procedure, on top of adding the database credentials to match your setup, set your `APP_URL` to the served subdirectory:
353356

354357
```bash
355358
APP_URL=https://my.url/photos/

0 commit comments

Comments
 (0)