Skip to content

Commit

Permalink
refactor: switch from Fetch API to Axios
Browse files Browse the repository at this point in the history
  • Loading branch information
gauthier-th committed Nov 7, 2024
1 parent 64f4610 commit 9803bc4
Show file tree
Hide file tree
Showing 102 changed files with 5,152 additions and 6,628 deletions.
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ pnpm-lock.yaml
# assets
src/assets/
public/
docs/
6 changes: 0 additions & 6 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ module.exports = {
singleQuote: true,
trailingComma: 'es5',
overrides: [
{
files: 'pnpm-lock.yaml',
options: {
rangeEnd: 0, // default: Infinity
},
},
{
files: 'gen-docs/pnpm-lock.yaml',
options: {
Expand Down
56 changes: 49 additions & 7 deletions docs/getting-started/buildfromsource.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ title: Build From Source (Advanced)
description: Install Jellyseerr by building from source
sidebar_position: 2
---

# Build from Source (Advanced)

:::warning
This method is not recommended for most users. It is intended for advanced users who are familiar with managing their own server infrastructure.
:::
Expand All @@ -12,31 +14,43 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

### Prerequisites

- [Node.js 20.x](https://nodejs.org/en/download/)
- [Pnpm 9.x](https://pnpm.io/installation)
- [Git](https://git-scm.com/downloads)

## Unix (Linux, macOS)

### Installation

1. Assuming you want the working directory to be `/opt/jellyseerr`, create the directory and navigate to it:

```bash
sudo mkdir -p /opt/jellyseerr && cd /opt/jellyseerr
```

2. Clone the Jellyseerr repository and checkout the develop branch:

```bash
git clone https://github.com/Fallenbagel/jellyseerr.git
cd jellyseerr
git checkout develop # by default, you are on the develop branch so this step is not necessary
```

3. Install the dependencies:

```bash
CYPRESS_INSTALL_BINARY=0 pnpm install --frozen-lockfile
```

4. Build the project:

```bash
pnpm build
```

5. Start Jellyseerr:

```bash
pnpm start
```
Expand All @@ -46,6 +60,7 @@ You can now access Jellyseerr by visiting `http://localhost:5055` in your web br
:::

#### Extending the installation

<Tabs groupId="unix-extensions" queryString>
<TabItem value="linux" label="Linux">
To run jellyseerr as a systemd service:
Expand All @@ -56,21 +71,23 @@ To run jellyseerr as a systemd service:
PORT=5055

## specify on which interface to listen, by default jellyseerr listens on all interfaces

#HOST=127.0.0.1

## Uncomment if your media server is emby instead of jellyfin.

# JELLYFIN_TYPE=emby

## Uncomment if you want to force Node.js to resolve IPv4 before IPv6 (advanced users only)
# FORCE_IPV4_FIRST=true
```
````
2. Then run the following commands:
```bash
which node
```
````
Copy the path to node, it should be something like `/usr/bin/node`.
3. Create the systemd service file at `/etc/systemd/system/jellyseerr.service`, using either `sudo systemctl edit jellyseerr` or `sudo nano /etc/systemd/system/jellyseerr.service`:
```bash
[Unit]
Description=Jellyseerr Service
Expand All @@ -88,15 +105,18 @@ ExecStart=/usr/bin/node dist/index.js
[Install]
WantedBy=multi-user.target
```

:::note
If you are using a different path to node, replace `/usr/bin/node` with the path to node.
:::

4. Enable and start the service:

```bash
sudo systemctl enable jellyseerr
sudo systemctl start jellyseerr
```

</TabItem>
<TabItem value="macos" label="macOS">
To run jellyseerr as a launchd service:
Expand All @@ -107,6 +127,7 @@ which node
Copy the path to node, it should be something like `/usr/local/bin/node`.

2. Create a launchd plist file at `~/Library/LaunchAgents/com.jellyseerr.plist`:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
Expand Down Expand Up @@ -135,21 +156,27 @@ Copy the path to node, it should be something like `/usr/local/bin/node`.
</dict>
</plist>
```

:::note
If you are using a different path to node, replace `/usr/local/bin/node` with the path to node.
:::
3. Load the service:
::: 3. Load the service:

```bash
sudo launchctl load ~/Library/LaunchAgents/com.jellyseerr.plist
```

3. Start the service:

```bash
sudo launchctl start com.jellyseerr
```

4. To ensure the service starts on boot, run the following command:

```bash
sudo lauchctl load
```

</TabItem>
<TabItem value="pm2" label="PM2">
To run jellyseerr as a PM2 service:
Expand Down Expand Up @@ -194,27 +221,38 @@ pm2 status jellyseerr
</Tabs>

## Windows

### Installation

1. Assuming you want the working directory to be `C:\jellyseerr`, create the directory and navigate to it:

```powershell
mkdir C:\jellyseerr
cd C:\jellyseerr
```

2. Clone the Jellyseerr repository and checkout the develop branch:

```powershell
git clone https://github.com/Fallenbagel/jellyseerr.git .
git checkout develop # by default, you are on the develop branch so this step is not necessary
```

3. Install the dependencies:

```powershell
npm install -g win-node-env
set CYPRESS_INSTALL_BINARY=0 && pnpm install --frozen-lockfile
```

4. Build the project:

```powershell
pnpm build
```

5. Start Jellyseerr:

```powershell
pnpm start
```
Expand All @@ -228,6 +266,7 @@ You can now access Jellyseerr by visiting `http://localhost:5055` in your web br
:::

#### Extending the installation

<Tabs groupId="windows-extensions" queryString>
<TabItem value="task-scheduler" label="Task Scheduler">
To run jellyseerr as a bat script:
Expand All @@ -249,6 +288,7 @@ node dist/index.js
- Click "Finish"

Now, Jellyseerr will start when the computer boots up in the background.

</TabItem>

<TabItem value="nssm" label="NSSM">
Expand Down Expand Up @@ -311,9 +351,11 @@ pm2 status jellyseerr
</Tabs>

### Updating

To update Jellyseerr, navigate to the Jellyseerr directory and run the following commands:

```bash
git pull
```
Then, follow the steps in the installation section to rebuild and restart Jellyseerr.

Then, follow the steps in the installation section to rebuild and restart Jellyseerr.
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
1 change: 0 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
module.exports = {
env: {
commitTag: process.env.COMMIT_TAG || 'local',
forceIpv4First: process.env.FORCE_IPV4_FIRST === 'true' ? 'true' : 'false',
},
images: {
remotePatterns: [
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
"@svgr/webpack": "6.5.1",
"@tanem/react-nprogress": "5.0.30",
"ace-builds": "1.15.2",
"axios": "1.3.4",
"axios-rate-limit": "1.3.0",
"bcrypt": "5.1.0",
"bowser": "2.11.0",
"connect-typeorm": "1.1.4",
Expand All @@ -60,6 +62,7 @@
"express-rate-limit": "6.7.0",
"express-session": "1.17.3",
"formik": "^2.4.6",
"global-agent": "^3.0.0",
"gravatar-url": "3.1.0",
"lodash": "4.17.21",
"mime": "3",
Expand Down
Loading

0 comments on commit 9803bc4

Please sign in to comment.