turn to alpine:3.12 for synology

This commit is contained in:
unknown 2022-12-03 19:25:36 +08:00
parent bb4657383b
commit 1b863b8c62
40 changed files with 250 additions and 278 deletions

View File

@ -11,6 +11,7 @@
* [🛠 Source Code (Linux/macOS)](installing-lanraragi/source.md)
* [🐧 Community (Linux)](installing-lanraragi/community.md)
* [👿 Jail (FreeBSD)](installing-lanraragi/jail.md)
* [🕸 Vagrant (Deprecated)](installing-lanraragi/vagrant.md)
## Basic Operations
@ -29,7 +30,6 @@
* [💾 Backup and Restore](advanced-usage/backup-and-restore.md)
* [📱 Using External Readers](advanced-usage/external-readers.md)
* [🌐 Network Interface Setup](advanced-usage/network-interfaces.md)
* [🕵️ Proxy Setup](advanced-usage/proxy-setup.md)
* [📏 Tag Rules](advanced-usage/tag-rules.md)
## Developer Guide <a href="extending-lanraragi" id="extending-lanraragi"></a>
@ -45,7 +45,6 @@
* [Database API](api-documentation/database-api.md)
* [Category API](api-documentation/category-api.md)
* [Shinobu API](api-documentation/shinobu-api.md)
* [Minion API](api-documentation/minion-api.md)
* [Miscellaneous other API](api-documentation/miscellaneous-other-api.md)
## Writing Plugins <a href="plugin-docs" id="plugin-docs"></a>

View File

@ -12,11 +12,6 @@ This allows you to seamlessly add archives from the Internet to your LRR instanc
By default, we will try to download any URL you chuck at us! This will mostly work for simple URLs that point directly to a file we support.
(For example, something like this very nice Quake booklet: `https://archive.org/download/quake-essays-sep-15-fin-4-graco-l-cl/QUAKE_essays_SEP15_FIN4_GRACoL_CL.pdf` will download without a fuss.)
{% hint style="info" %}
Downloaded archives will automatically get a `source:` tag with the URL they were downloaded from.
Said source tags can often be used with compatible Metadata plugins to fetch metadata precisely. (Supported by E-H and nH)
{% endhint %}
For non-direct links, you will need to have a matching **Downloader Plugin** configured.
LANraragi currently ships with Downloaders handling E-H and Chaika links.

View File

@ -40,7 +40,7 @@ Server available at http://127.0.0.1:8000
```bash
docker run --name=lanraragi -p 8000:8000 \
--mount type=bind,source=[YOUR_CONTENT_DIRECTORY],\
target=/root/lanraragi/content \
target=/home/koyomi/lanraragi/content \
-e LRR_NETWORK=http://*:8000 difegue/lanraragi
```
@ -49,7 +49,7 @@ target=/root/lanraragi/content \
```bash
docker run --name=lanraragi-ssl -p 3333:3333 \
--mount type=bind,source=[YOUR_CONTENT_DIRECTORY],\
target=/root/lanraragi/content \
target=/home/koyomi/lanraragi/content \
--mount type=bind,source=[DIRECTORY_CONTAINING_SSL_CERT],target=/ssl \
-e LRR_NETWORK="https://*:3333?cert=/ssl/crt.crt&key=/ssl/crt.key" difegue/lanraragi
```

View File

@ -1,67 +0,0 @@
# 🕵️ Proxy Setup
## Setting up LANraragi behind a proxy (reverse proxy setup)
A common post-install setup is to make requests to the app transit through a gateway server such as Apache or nginx.
If you do so, please note that archive uploads through LRR will likely **not work out of the box** due to maximum sizes on uploads those servers can enforce. The example below is for nginx:
```
http {
client_max_body_size 0; <----------------------- This line here
}
server {
listen 80;
server_name lanraragi.[REDACTED].net;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
index index.php index.html index.htm;
server_name lanraragi.[REDACTED].net;
client_max_body_size 0; <----------------------- And this line here
# Cert Stuff Omitted
location / {
proxy_pass http://0.0.0.0:3000;
proxy_http_version 1.1;
<----- The two following lines are needed for batch tagger support with SSL ----->
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
```
## Setting up LANraragi to use a proxy for outbound network requests
This is a less common scenario, but you might want to have downloads or metadata requests to external services go through a proxy, in case said external services are blocked by your friendly local totalitarian regime.
LANraragi runs on top of the Mojolicious web server, which has [built-in](https://docs.mojolicious.org/Mojo/UserAgent/Proxy#detect) support for proxifying external requests.
To enable automatic proxy detection, the `MOJO_PROXY` environment variable must be set to 1 on your machine: This is enabled by default on Docker builds.
Once said detection enabled, environment variables `HTTP_PROXY, http_proxy, HTTPS_PROXY, https_proxy, NO_PROXY` and `no_proxy` will be checked for proxy information.
Here's an example for a Docker-compose setup:
```
---
version: "2.1"
services:
lanraragi:
image: difegue/lanraragi:latest
container_name: lanraragi
environment:
- http_proxy=http://192.168.10.186:1082
- https_proxy=http://192.168.10.186:1082
volumes:
- [database]:/root/lanraragi/database
- [content]:/root/lanraragi/content
ports:
- 7070:3000
restart: unless-stopped
```

View File

@ -10,7 +10,11 @@ Get tags from the database, with a value symbolizing their prevalence.
{% endswagger-description %}
{% swagger-parameter name="minweight" type="int" required="false" in="query" %}
Add this parameter if you want to only get tags whose weight is at least the given minimum.
Add this parameter if you want to only get tags whose weight is at least the given minimum.
\
Default is 1 if not specified, to get all tags.
{% endswagger-parameter %}
@ -47,7 +51,11 @@ Cleans the Database, removing entries for files that are no longer on the filesy
{% swagger baseUrl="http://lrr.tvc-16.science" path="/api/database/drop" method="post" summary="🔑Drop the Database" %}
{% swagger-description %}
Delete the entire database, including user preferences.
Delete the entire database, including user preferences.
\
This is a rather dangerous endpoint, invoking it might lock you out of the server as a client!
{% endswagger-description %}
@ -63,7 +71,11 @@ This is a rather dangerous endpoint, invoking it might lock you out of the serve
{% swagger baseUrl="http://lrr.tvc-16.science" path="/api/database/backup" method="get" summary="🔑Get a backup JSON" %}
{% swagger-description %}
Scans the entire database and returns a backup in JSON form.
Scans the entire database and returns a backup in JSON form.
\
This backup can be reimported manually through the Backup and Restore feature.
{% endswagger-description %}

View File

@ -1,77 +0,0 @@
---
description: Control the built-in Minion Job Queue.
---
# Minion API
{% swagger baseUrl="http://lrr.tvc-16.science" path="/api/minion/:jobid" method="get" summary="Get the basic status of a Minion Job" %}
{% swagger-description %}
For a given Minion job ID, check whether it succeeded or failed.
Minion jobs are ran for various occasions like thumbnails, cache warmup and handling incoming files.
{% endswagger-description %}
{% swagger-parameter name="id" type="string" required="true" in="path" %}
ID of the Job.
{% endswagger-parameter %}
{% swagger-response status="200" description="You get job data." %}
```javascript
{
"state": "finished",
"task": "handle_upload",
"error": null
}
{
"state": "failed",
"task": "thumbnail_task",
"error": "oh no"
}
```
{% endswagger-response %}
{% endswagger %}
{% swagger baseUrl="http://lrr.tvc-16.science" path="/api/minion/:jobid/detail" method="get" summary="🔑Get the full status of a Minion Job" %}
{% swagger-description %}
Get the status of a Minion Job.
This API is there for internal usage mostly, but you can use it to get detailed status for jobs like plugin runs or URL downloads.
{% endswagger-description %}
{% swagger-parameter name="id" type="string" required="true" in="path" %}
ID of the Job.
{% endswagger-parameter %}
{% swagger-response status="200" description="You get detailed job data." %}
```javascript
{
"args": ["\/tmp\/QF3UCnKdMr\/myfile.zip"],
"attempts": 1,
"children": [],
"created": "1601145004",
"delayed": "1601145004",
"expires": null,
"finished": "1601145004",
"id": 7,
"lax": 0,
"notes": {},
"parents": [],
"priority": 0,
"queue": "default",
"result": {
"id": "75d18ce470dc99f83dc355bdad66319d1f33c82b",
"message": "This file already exists in the Library.",
"success": 0
},
"retried": null,
"retries": 0,
"started": "1601145004",
"state": "finished",
"task": "handle_upload",
"time": "1601145005",
"worker": 1
}
```
{% endswagger-response %}
{% endswagger %}

View File

@ -283,18 +283,10 @@ You can either use `login`, `metadata`, `script`, or `all` to get all previous t
{
"desc": "Save archive title",
"type": "bool"
},
{
"desc": "Save the original title when available instead of the English or romanised title",
"type": "bool"
},
{
"desc": "Fetch additional timestamp (time posted) and uploader metadata",
"type": "bool"
}
],
"type": "metadata",
"version": "2.3"
"version": "2.2"
},
{
"author": "Pao",
@ -464,4 +456,47 @@ Whether to generate all thumbnails, or only the missing ones.
}
```
{% endswagger-response %}
{% endswagger %}
{% endswagger %}
{% swagger baseUrl="http://lrr.tvc-16.science" path="/api/minion/:jobid" method="get" summary="🔑Get the status of a Minion Job" %}
{% swagger-description %}
Get the status of a Minion Job. Minions jobs are ran for various occasions like thumbnails, cache warmup and handling incoming files.
Usually stuff you don't need to care about as a client, but the API is there for internal usage mostly.
{% endswagger-description %}
{% swagger-parameter name="id" type="string" required="true" in="path" %}
ID of the Job.
{% endswagger-parameter %}
{% swagger-response status="200" description="" %}
```javascript
{
"args": ["\/tmp\/QF3UCnKdMr\/myfile.zip"],
"attempts": 1,
"children": [],
"created": "1601145004",
"delayed": "1601145004",
"expires": null,
"finished": "1601145004",
"id": 7,
"lax": 0,
"notes": {},
"parents": [],
"priority": 0,
"queue": "default",
"result": {
"id": "75d18ce470dc99f83dc355bdad66319d1f33c82b",
"message": "This file already exists in the Library.",
"success": 0
},
"retried": null,
"retries": 0,
"started": "1601145004",
"state": "finished",
"task": "handle_upload",
"time": "1601145005",
"worker": 1
}
```
{% endswagger-response %}
{% endswagger %}

View File

@ -40,9 +40,3 @@ Plugins have as much control over your system as the main LANraragi application
When installing Plugins from unknown sources, do a little research first.
{% endhint %}
## About source: tags
If your archive has a `source:` tag (likely from the use of the [built-in downloading feature](../advanced-usage/downloading.md)), many plugins will use said tag to directly fetch metadata from it without having to use heuristics of any kind to guess what your archive is.
If you have the URL on hand directly, you can either add it as a `source:` tag to your archive, or use it as a one-shot parameter on most downloader plugins.

View File

@ -10,5 +10,5 @@ You can write your own themes by modifying the existing ones - Dropping them in
{% hint style="warning" %}
For users who don't have access to the app folder and want to make custom themes, your only option currently is to use a custom CSS browser extension.
Docker users can try binding a folder on their machine to the _/root/lanraragi/public/themes_ folder.
Docker users can try binding a folder on their machine to the _/home/koyomi/lanraragi/public/themes_ folder.
{% endhint %}

View File

@ -24,7 +24,7 @@ Those variables were introduced for the Homebrew package, but they can be declar
While Perl's mantra is "There's more than one way to do it", I try to make LRR follow the PBP, aka Perl Best Practices.
This is done by the use of the [Perl::Critic](https://metacpan.org/pod/Perl::Critic) module, which reports PBP violations.
If installed, you can run the critic on the entire LRR source tree through the `npm run critic` shortcut command.
Critic is automatically run on every commit made to LRR at the level 5 thanks to [GitHub Actions](../../../.github/main.workflow).
Critic is automatically run on every commit made to LRR at the level 5 thanks to [Github Actions](../../../.github/main.workflow).
I also run [perltidy](https://en.wikipedia.org/wiki/PerlTidy) on the source tree every now and then for consistency.
The rules used in perltidy passes are stored in the .perltidyrc file at the source root.
@ -47,14 +47,14 @@ I recommend trying to only use exported functions in your code, and consider the
```
root/
|- .devcontainer <- VSCode setup files for Codespaces
|- .github <- GitHub-specific files
|- .github <- Github-specific files
| |- action-run-tests <- Run the LRR Test Suite
| |- ISSUE_TEMPLATE <- Template for bug reports
| |- workflows <- GitHub Actions workflows
| |- workflows <- Github Actions workflows
| |- CD <- Continuous Delivery, Nightly builds
| |- CI <- Tests
| +- Release <- Build latest and upload .zip to release post on GH
| +- FUNDING.yml <- GitHub Sponsors file
| +- FUNDING.yml <- Github Sponsors file
|
|- content <- Default content folder
|
@ -117,6 +117,7 @@ root/
| |- windows <- Windows build script and submodule link to the Karen WPF Bootstrapper
| |- docker <- Dockerfile and configuration files for LRR Docker Container
| |- homebrew <- Script and configuration files for the LRR Homebrew cask
| |- vagrant <- Vagrantfile for LRR Vagrant Machine
| |- cpanfile <- Perl dependencies description
| |- install.pl <- LANraragi Installer
| +- lanraragi-systemd.service <- Example SystemD service

View File

@ -12,24 +12,43 @@ Docker is the best way to install the software on remote servers. I don't recomm
## Cloning the base LRR image
Download [the Docker setup](https://www.docker.com/products/docker) and install it.
Download [the Docker setup](https://www.docker.com/products/docker) and install it. Once you're done, execute:
{% hint style="warning" %}
The LRR Docker container uses a fairly recent ([3.14](https://alpinelinux.org/posts/Alpine-3.14.0-released.html)) version of Alpine Linux as its base. I recommend you use at least Docker version **20.10.0** to avoid issues with the `faccessat2` syscall.
You can check your Docker version by executing `docker version`.
{% endhint %}
Once you're done, execute:
```bash
docker run --name=lanraragi -p 3000:3000 \
--mount type=bind,source=[YOUR_CONTENT_DIRECTORY],target=/root/lanraragi/content \
--mount type=bind,source=[YOUR_DATABASE_DIRECTORY],target=/root/lanraragi/database \
--mount type=bind,source=[YOUR_CONTENT_DIRECTORY],target=/home/koyomi/lanraragi/content \
--mount type=bind,source=[YOUR_DATABASE_DIRECTORY],target=/home/koyomi/lanraragi/database \
difegue/lanraragi
```
{% hint style="warning" %}
If your Docker version is [_below 17.06_](https://docs.docker.com/storage/bind-mounts/) and you use the --mount option as listed above, you will get the following error:
```bash
unknown flag: --mount
See 'docker run --help'.
```
You can bypass this issue by using the --volume option for bind-mounting like so:
```bash
docker run --name=lanraragi -p 3000:3000 \
--volume [YOUR_CONTENT_DIRECTORY]:/home/koyomi/lanraragi/content \
--volume [YOUR_CONTENT_DIRECTORY]:/home/koyomi/lanraragi/database \
difegue/lanraragi
```
{% endhint %}
{% hint style="info" %}
You can tell Docker to auto-restart the LRR container on boot by adding the `--restart always` flag to this command.
{% endhint %}
{% hint style="warning" %}
If you're running on Windows, please check the syntax for mapping your content directory [here](https://docs.docker.com/docker-for-windows/#shared-drives).
Windows 7/8 users running the Legacy Docker toolbox will have to explicitly forward port 127.0.0.1:3000 from the host to the container in order to be able to access the app.
{% endhint %}
The content directory you have to specify in the command above will contain archives you either upload through the software or directly drop in, alongside generated thumbnails.
The database directory houses the LANraragi database(As database.rdb), allowing you to hotswap containers without losing any data.
@ -39,8 +58,8 @@ You can also mount the database directory to a dedicated Docker volume:
```bash
docker volume create lrr-database
docker run --name=lanraragi -p 3000:3000 \
--mount type=bind,source=[YOUR_CONTENT_DIRECTORY],target=/root/lanraragi/content \
--mount source=lrr-database,target=/root/lanraragi/database \
--mount type=bind,source=[YOUR_CONTENT_DIRECTORY],target=/home/koyomi/lanraragi/content \
--mount source=lrr-database,target=/home/koyomi/lanraragi/database \
difegue/lanraragi
```
@ -65,28 +84,10 @@ If you're feeling **extra dangerous**, you can run the last files directly from
`docker run [zoinks] difegue/lanraragi:nightly`
{% endhint %}
## Platform-specific caveats
### Windows
If you're running on Windows, please check the syntax for mapping your content directory [here](https://docs.docker.com/docker-for-windows/#shared-drives).
Windows 7/8 users running the Legacy Docker toolbox will have to explicitly forward port 127.0.0.1:3000 from the host to the container in order to be able to access the app.
### Raspbian
If you're using **Raspbian**, it's likely you'll encounter installation issues like `s6-svscan: warning: unable to iopause: Operation not permitted` due to their outdated version of `libseccomp`.
You can fix this by either adding `--security-opt seccomp=unconfined` to your Docker arguments(discouraged, allows LRR wider access to underlying OS), or by installing an up-to-date version of `libseccomp`:
```bash
wget http://ftp.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1~bpo10+1_armhf.deb
sudo dpkg -i libseccomp2_2.5.1-1~bpo10+1_armhf.deb
```
Regular versions of Debian shouldn't have this issue.
## Changing the port
Since Docker allows for port mapping, you can most of times map the default port of 3000 to another port on your host quickly.
If you need something a bit more involved (like adding SSL), please check the Network Interfaces section for how to use the `LRR_NETWORK` environment variable.
If you need something a bit more involved (like adding SSL), please check the Network Interfaces section for how to use thhe `LRR_NETWORK` environment variable.
{% content-ref url="../advanced-usage/network-interfaces.md" %}
[network-interfaces.md](../advanced-usage/network-interfaces.md)
@ -115,13 +116,10 @@ As Docker containers are immutable, you need to destroy your existing container
docker pull difegue/lanraragi
docker stop lanraragi
docker rm lanraragi
docker run --name=lanraragi -p 3000:3000 \
--mount type=bind,source=[YOUR_CONTENT_DIRECTORY],target=/root/lanraragi/content \
--mount type=bind,source=[YOUR_DATABASE_DIRECTORY],target=/root/lanraragi/database \
difegue/lanraragi
docker run --name=lanraragi -p 3000:3000 --mount type=bind,source=[YOUR_CONTENT_DIRECTORY],target=/home/koyomi/lanraragi/content difegue/lanraragi
```
As long as you use the same content/database directories as before, your data will still be there.
As long as you use the same content directory as the mount source, your data will still be there.
{% hint style="info" %}
If you update often, you might want to consider using docker-compose or [Portainer](https://portainer.io) to redeploy containers without entering the entire configuration every time.

View File

@ -1,4 +1,4 @@
# 🍎 Homebrew (macOS/Linux)
# 🍎 Homebrew (macOS)
## Migration
@ -34,9 +34,8 @@ brew install lanraragi
## Configuration
Your content folder is stored by default in `${HOME}/Library/Application Support/LANraragi`. (`${HOME}/LANraragi/content` on Linux.)
The Redis database is stored in `${HOME}/Library/Application Support/LANraragi/database`. (`${HOME}/LANraragi/database` on Linux.)
While the in-app settings page won't allow you to change the location of the content folder, you can do so by overriding the `LRR_DATA_DIRECTORY` environment variable before launching.
Your content folder is stored by default in `${HOME}/Library/Application Support/LANraragi`.
The Redis database is stored in `${HOME}/Library/Application Support/LANraragi/database`. The content folder can be moved to any folder you want through the in-app settings page.
## Usage
@ -65,4 +64,4 @@ The same warning as in the Installation step applies.
## Uninstallation
Run `brew remove lanraragi` to uninstall the app.
Data in the `${HOME}/Library/Application Support/LANraragi`/`${HOME}/LANraragi/` folder is not deleted.
Data in the `${HOME}/Library/Application Support/LANraragi` folder is not deleted.

View File

@ -9,9 +9,9 @@ However, a lot of work as been done behind the scenes to make it easy!
Look at the methods below for something that fits your OS and usage.
## Linux/macOS: _Homebrew_
## macOS: _Homebrew_
[Homebrew](https://brew.sh) allows you to quickly setup LRR on macOS and Linux without relying on containers or modifying your preinstalled system libaries.
[Homebrew](https://brew.sh) allows you to quickly setup LRR on macOS without relying on containers or modifying your preinstalled system libaries.
![brew](<../.screenshots/brew.jpg>)
@ -23,6 +23,9 @@ Look at the methods below for something that fits your OS and usage.
{% hint style="warning" %}
This method works on **64-bit** editions of Windows 10 only.
Since LRR 0.8.0, you need Windows 10 version _1903_ at least. 0.7.9 will work with version _1809_ if you're on an LTSC channel.
If you still want to use further server versions on 1809, a step-by-step workaround is available on the Windows documentation page below.
{% endhint %}
![win10](../.screenshots/karen.jpg)
@ -66,8 +69,51 @@ Similar to installing from source with an altered process for FreeBSD compatabil
[jail.md](jail.md)
{% endcontent-ref %}
## Windows 7 or 8: don't
## Older Windows: _Legacy Docker Toolbox or Vagrant_
![I really hope you guys don't do this](../.screenshots/shiggy.png)
Switch to 10 or Linux.
At this point the only solutions I have to give you are basically glorified VMs.
You can either download the [Legacy Docker Toolbox](https://docs.docker.com/toolbox/toolbox\_install\_windows/) and follow the Docker tutorial linked above, or try Vagrant. I provide **no support** for either of these methods.
{% content-ref url="vagrant.md" %}
[vagrant.md](vagrant.md)
{% endcontent-ref %}
## WARNING: Reverse Proxies
A common post-install setup is to make requests to the app transit through a gateway server such as Apache or nginx.
If you do so, please note that archive uploads through LRR will likely **not work out of the box** due to maximum sizes on uploads those servers can enforce. The example below is for nginx:
```
http {
client_max_body_size 0; <----------------------- This line here
}
server {
listen 80;
server_name lanraragi.[REDACTED].net;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
index index.php index.html index.htm;
server_name lanraragi.[REDACTED].net;
client_max_body_size 0; <----------------------- And this line here
# Cert Stuff Omitted
location / {
proxy_pass http://0.0.0.0:3000;
proxy_http_version 1.1;
<----- The two following lines are needed for batch tagger support with SSL ----->
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
```

View File

@ -20,14 +20,14 @@ For information, my personal tests are done using Debian's vendor Perl.
apt-get update
apt-get upgrade -y
apt-get install build-essential make gnupg pkg-config \
cpanminus redis-server libarchive-dev imagemagick webp libssl-dev zlib1g-dev libjxl-dev \
cpanminus redis-server libarchive-dev imagemagick webp libssl-dev zlib1g-dev \
perlmagick ghostscript npm
```
_Base software dependencies._
{% hint style="info" %}
If your package manager requires you to specify which ImageMagick version to install, choose version 7.
If your package manager requires you to specify which ImageMagick version to install you need to choose version 7.
{% endhint %}
{% hint style="info" %}
@ -37,17 +37,14 @@ For macOS, you should be able to install the dependencies using Homebrew.
## Installing LRR
All you need to do is clone the git repo somewhere (or download one of [the releases](https://github.com/Difegue/LANraragi/releases)) and run the installer.
I recommend doing this with a brand new Linux user account. (I'm using "root" here):
I recommend doing this with a brand new Linux user account. (I'm using "koyomi" here):
```
git clone -b master http://github.com/Difegue/LANraragi /root/lanraragi
cd /root/lanraragi && sudo npm run lanraragi-installer install-full
git clone -b master http://github.com/Difegue/LANraragi /home/koyomi/lanraragi
cd /home/koyomi/lanraragi && sudo npm run lanraragi-installer install-full
```
{% hint style="info"}
Do not use `sudo` in the above command if you are using `perlbrew`.
Arch users might need to install `perl-config-autoconf` and use env variable `export PERL5LIB=~/perl5/lib/perl5` before running the installer.
{% endhint %}
Note: Do not use `sudo` in the above command if you are using `perlbrew`.
Once this is done, you can get started by running `npm start` and opening [http://localhost:3000](http://localhost:3000).

View File

@ -2,22 +2,12 @@
## Download a Release
You can directly install LANraragi from the Microsoft Store, using either this link: (paste in a browser window)
You can directly install LANraragi from the [Microsoft Store](https://cutt.ly/9TJIMC6). This will install the latest release.
[<img src="https://getbadgecdn.azureedge.net/images/English_L.png">](https://cutt.ly/9TJIMC6)
ms-windows-store://pdp/?productid=XP9K4NMNPDMH6L
Or through winget:
```
winget install lanraragi
```
{% hint style="warning" %}
The installer will tell you about this anyways, but LRR for Windows **requires** the Windows Subsystem for Linux to function properly.
Read the tutorial [here](https://docs.microsoft.com/en-us/windows/wsl/install) to see how to enable WSL on your Windows 10 machine.
WSL defaults to WSL2, so if the installer doesn't work properly make sure you have virtualization enabled as well, or switch to WSL1. (`wsl --set-default-version 1`)
You don't need to install a distribution through the Windows Store, as that is handled by the LRR installer package.
{% endhint %}
As an alternative, you can always download the latest Windows MSI Installer on the [Release Page](https://github.com/Difegue/LANraragi/releases).
@ -33,13 +23,44 @@ You might get a SmartScreen prompt from Windows (doesn't seem to happen with the
(If you're wondering why I don't sign installers, [this](https://gaby.dev/posts/code-signing) article is a good read.)
{% hint style="info" %}
MS Store/winget installs will be installed to the default location. If you don't want the app to install in _%AppData%_, consider downloading the installer and running it manually.
MS Store installs will be installed to the default location. If you don't want the app to install in _%AppData%_, consider downloading the installer and running it manually.
{% endhint %}
{% hint style="warning" %}
The installer will tell you about this anyways, but LRR for Windows **requires** the Windows Subsystem for Linux to function properly.
Read the tutorial [here](https://docs.microsoft.com/en-us/windows/wsl/install) to see how to enable WSL on your Windows 10 machine.
You don't need to install a distribution through the Windows Store, as that is handled by the LRR installer package.
{% endhint %}
Once the install completes properly, you'll be able to launch the GUI from the shortcut in your Start Menu:
![](../.screenshots/karen-startmenu.png)
## Installation on Windows 10 1809 (LTSC)
Recent MSI packages don't install on 1809 anymore due to underlying changes to make the installer lighter, but you can still sideload the latest server version on top of an old 0.7.9 install.
{% hint style="warning" %}
This method shouldn't break in the foreseeable future, but as the Win32 bootstrapper will still be the 0.7.9 version, you might lose out on future functionalities later on.
You might want to consider switching to a [source install](./source.md) on top of a Debian WSL distro you'd maintain yourself.
{% endhint %}
1. Install 0.7.9 like normal, this is mostly done to get the Win32 UI application installed on to your taskbar, we'll install the updated Linux image next.
2. If you started the service and the Windows application, make sure to close BOTH.
3. Download the [MSI installer for the latest version](https://github.com/Difegue/LANraragi/releases/latest)
4. Open the MSI file in 7zip, and extract the "package.tar" file, which is the underlying Linux image
5. Download [LxRunOffline](https://github.com/DDoSolitary/LxRunOffline/releases) and put it in the same directory as the "package.tar" file you just extracted
6. Uninstall the old Linux image from 0.7.9 with the following command, make sure to have your command window opened as administrator:
`lxrunoffline ui -n lanraragi`
7. install the new image:
`lxrunoffline i -n lanraragi -d "C:\Users\*your user name*\AppData\Roaming\LANraragi\Distro\rootfs" -f LANraragi.tar`
Note: the name of the install HAS to be "lanraragi", do not change this on the -n argument
8. Start the application again, and you should see that it now shows the newest version of the server
## Configuration
Starting the GUI for the first time will prompt you to setup your content folder and the port you want the server to listen on. The main GUI is always available from your Taskbar.

View File

@ -24,7 +24,7 @@ Basically, _as long as it can run, it will run_.
{% hint style="danger" %}
As you might've guessed, Plugins run with the same permissions as the main application.
This means they can modify the application database at will, delete files, and execute system commands.
None of this is obviously an issue if the application is installed in a proper fashion.(Docker/VM, or non-root user on Linux _I seriously hope you guys don't run this as root_)
None of this is obviously an issue if the application is installed in a proper fashion.(Docker/Vagrant, or non-root user on Linux _I seriously hope you guys don't run this as root_)
Still, as said in the User Documentation, be careful of what you do with Plugins.
{% endhint %}
@ -69,7 +69,7 @@ The `type` field can be either:
* `login` for [Login Plugins](login.md)
* `metadata` for [Metadata Plugins](metadata.md)
* `download` for [Downloader Plugins](download.md)
* `download` for [Downloader Plugins](downloaders.md)
* `script` for [Script Plugins](scripts.md)
The `parameters` array can contain as many arguments as you need. They can be set by the user in Plugin Configuration, and are transmitted every time.

View File

@ -24,7 +24,6 @@ The variables match the parameters you've entered in the `plugin_info` subroutin
The `$lrr_info` hash contains various variables you can use in your plugin:
* _$lrr\_info->{archive\_id}_: The internal ID of the archive.
* _$lrr\_info->{archive\_title}_: The title of the archive, as entered by the User.
* _$lrr\_info->{existing\_tags}_: The tags that are already in LRR for this archive, if there are any.
* _$lrr\_info->{thumbnail\_hash}_: A SHA-1 hash of the first image of the archive.

View File

@ -1,3 +0,0 @@
#!/usr/bin/execlineb -S0
# (-t)erminate running services to allow container to restart
s6-svscanctl -t /var/run/s6/services

View File

@ -1,4 +0,0 @@
#!/bin/sh
cd /root/lanraragi/
export HOME=/root
perl /root/lanraragi/script/launcher.pl -f /root/lanraragi/script/lanraragi

View File

@ -1,3 +0,0 @@
#!/usr/bin/execlineb -S0
# (-t)erminate running services to allow container to restart
s6-svscanctl -t /var/run/s6/services

View File

@ -1,2 +0,0 @@
#!/bin/sh
/usr/bin/redis-server /root/lanraragi/tools/build/docker/redis.conf

View File

@ -1 +0,0 @@
oneshot

View File

@ -1 +0,0 @@
/etc/s6-overlay/s6-rc.d/init/01-lrr-setup

View File

@ -1,4 +0,0 @@
#!/bin/sh
kill -15 `cat /root/lanraragi/public/temp/shinobu.pid-s6`
kill -15 `cat /root/lanraragi/public/temp/minion.pid-s6`
sleep 5

View File

@ -1,4 +0,0 @@
#!/bin/sh
cd /root/lanraragi/
export HOME=/root
exec perl /root/lanraragi/script/launcher.pl -f /root/lanraragi/script/lanraragi

View File

@ -1 +0,0 @@
longrun

View File

@ -1,2 +0,0 @@
#!/bin/sh
exec /usr/bin/redis-server /root/lanraragi/tools/build/docker/redis.conf

View File

@ -1 +0,0 @@
longrun

2
tools/build/vagrant/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.vagrant
database.rdb

22
tools/build/vagrant/Vagrantfile vendored Normal file
View File

@ -0,0 +1,22 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
config.vm.box = "debian/jessie64"
config.vm.network :forwarded_port, guest: 3000, host: 3000
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
config.vm.provision "shell",
inline: "docker stop lanraragi || true && docker rm lanraragi || true"
config.vm.provision "docker" do |d|
d.pull_images "difegue/lanraragi:latest"
d.run "difegue/lanraragi:latest",
args: "--name=lanraragi -e LRR_UID=1000 -p 3000:3000 --restart=always --mount type=bind,source=/vagrant,target=/root/lanraragi/content "
end
config.vm.post_up_message = "LANraragi Vagrant Machine Started, App should be available at http://localhost:3000."
end

View File

@ -0,0 +1,22 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
config.vm.box = "debian/jessie64"
config.vm.network :forwarded_port, guest: 3000, host: 3000
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
config.vm.provision "shell",
inline: "docker stop lanraragi || true && docker rm lanraragi || true"
config.vm.provision "docker" do |d|
d.pull_images "difegue/lanraragi"
d.run "difegue/lanraragi:nightly",
args: "--name=lanraragi -e LRR_UID=1000 -p 3000:3000 --restart=always --mount type=bind,source=/vagrant,target=/root/lanraragi/content "
end
config.vm.post_up_message = "LANraragi Vagrant Machine Started, App should be available at http://localhost:3000."
end

View File

@ -19,4 +19,4 @@ nuget restore
# Build Karen and Setup
msbuild /p:Configuration=Release
Get-FileHash .\Setup\bin\LANraragi.msi | Format-List
Get-FileHash .\Setup\bin\LANraragi.msi | Format-List

View File

@ -6,7 +6,7 @@ requires 'local::lib', 2.000024;
requires 'Redis', 1.995;
requires 'Encode', 3.01;
requires 'Archive::Libarchive::Extract', 0.03;
requires 'Archive::Libarchive::Peek', 0.04;
requires 'Archive::Libarchive::Peek', 0.03;
requires 'Digest::SHA', 6.02;
# Not required by LRR itself but needs this version for Alpine support
@ -36,7 +36,7 @@ requires 'Test::Trap', 0.3.4;
requires 'Test::Deep', 1.130;
# Mojo stuff
requires 'Mojolicious', 9.27;
requires 'Mojolicious', 9.19;
requires 'Mojolicious::Plugin::TemplateToolkit', 0.005;
requires 'Mojolicious::Plugin::RenderFile', 0.12;
requires 'Mojolicious::Plugin::Status', 1.15;
@ -44,7 +44,7 @@ requires 'IO::Socket::SSL', 2.067;
requires 'Cpanel::JSON::XS', 4.06;
# Job Queue (Minion)
requires 'Minion', 10.25;
requires 'Minion', 10.20;
requires 'Minion::Backend::Redis', 0.002;
# Background Worker (Shinobu)

BIN
tools/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB