mirror of
https://github.com/Radiquum/AniX.git
synced 2025-09-05 05:55:36 +05:00
feat: add support for custom API url
This commit is contained in:
parent
2f928579f9
commit
ba73fc3308
4 changed files with 20 additions and 13 deletions
|
@ -1,3 +1,4 @@
|
||||||
# пример заполнения: https://example.com, http://0.0.0.0:80
|
# пример заполнения: https://example.com, http://0.0.0.0:80
|
||||||
NEXT_PUBLIC_PLAYER_PARSER_URL= # Домен сервиса player-parsers, требуется для работы встроенного плеера
|
NEXT_PUBLIC_PLAYER_PARSER_URL= # Домен сервиса player-parsers, требуется для работы встроенного плеера
|
||||||
|
NEXT_PUBLIC_API_URL= # Домен сервиса api-prox, для использования своего сервера API вместо встроенного middleware
|
||||||
# ---
|
# ---
|
|
@ -26,11 +26,12 @@
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
5. (опционально) добавьте переменную для использования своего плеера:
|
5. (опционально) добавьте переменные для использования своего плеера и\или API прокси:
|
||||||
|
|
||||||
- NEXT_PUBLIC_PLAYER_PARSER_URL
|
- NEXT_PUBLIC_PLAYER_PARSER_URL
|
||||||
|
- NEXT_PUBLIC_API_URL
|
||||||
|
|
||||||
на те которые вы получили, если развёртывали [anix-player-parsers](./player-parsers/README.RU.md)
|
на те которые вы получили, если развёртывали [anix-player-parsers](./player-parsers/README.RU.md) и/или [anix-api-prox](./api-prox/README.RU.md)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -73,11 +74,12 @@
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
7. (опционально) добавьте переменную для использования своего плеера:
|
7. (опционально) добавьте переменную для использования своего плеера и\или API прокси::
|
||||||
|
|
||||||
- NEXT_PUBLIC_PLAYER_PARSER_URL
|
- NEXT_PUBLIC_PLAYER_PARSER_URL
|
||||||
|
- NEXT_PUBLIC_API_URL
|
||||||
|
|
||||||
на те которые вы получили, если развёртывали [anix-player-parsers](./player-parsers/README.RU.md)
|
на те которые вы получили, если развёртывали [anix-player-parsers](./player-parsers/README.RU.md) и/или [anix-api-prox](./api-prox/README.RU.md)
|
||||||
|
|
||||||
1. 
|
1. 
|
||||||
|
|
||||||
|
@ -120,7 +122,7 @@
|
||||||
- -p - порт контейнера который будет доступен извне. ПОРТ:3000
|
- -p - порт контейнера который будет доступен извне. ПОРТ:3000
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> для переменных которые вы получили, если развёртывали [anix-player-parsers](./player-parsers/README.RU.md), необходимо использовать `-e ПЕРЕМЕННАЯ=ЗНАЧЕНИЕ` до последнего слова anix
|
> для переменных которые вы получили, если развёртывали [anix-player-parsers](./player-parsers/README.RU.md) и/или [anix-api-prox](./api-prox/README.RU.md), необходимо использовать `-e ПЕРЕМЕННАЯ=ЗНАЧЕНИЕ` до последнего слова anix
|
||||||
|
|
||||||
[команда docker run](https://docs.docker.com/reference/cli/docker/container/run/)
|
[команда docker run](https://docs.docker.com/reference/cli/docker/container/run/)
|
||||||
|
|
||||||
|
@ -150,7 +152,7 @@
|
||||||
1. Клонируйте репозиторий `git clone https://github.com/Radiquum/AniX`
|
1. Клонируйте репозиторий `git clone https://github.com/Radiquum/AniX`
|
||||||
2. Переместитесь в директорию репозитория `cd AniX`
|
2. Переместитесь в директорию репозитория `cd AniX`
|
||||||
3. Выполните команду `npm install`
|
3. Выполните команду `npm install`
|
||||||
4. (опционально) скопируйте .env.sample как .env и заполните его переменными которые вы получили, если развёртывали [anix-player-parsers](./player-parsers/README.RU.md)
|
4. (опционально) скопируйте .env.sample как .env и заполните его переменными которые вы получили, если развёртывали [anix-player-parsers](./player-parsers/README.RU.md) и/или [anix-api-prox](./api-prox/README.RU.md)
|
||||||
5. Выполните команду `npm run build`
|
5. Выполните команду `npm run build`
|
||||||
6. создайте новую директорию (далее будем использовать `<имя_новой_директории>` как её имя)
|
6. создайте новую директорию (далее будем использовать `<имя_новой_директории>` как её имя)
|
||||||
7. переместите в созданную директорию (`<имя_новой_директории>`)
|
7. переместите в созданную директорию (`<имя_новой_директории>`)
|
||||||
|
|
|
@ -26,11 +26,12 @@ Requirements:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
5. (optional) Add variable to use your own player:
|
5. (optional) Add variable to use your own player and/or api-proxy:
|
||||||
|
|
||||||
- NEXT_PUBLIC_PLAYER_PARSER_URL
|
- NEXT_PUBLIC_PLAYER_PARSER_URL
|
||||||
|
- NEXT_PUBLIC_API_URL
|
||||||
|
|
||||||
Use the ones you received if you deployed [anix-player-parsers](./player-parsers/README.md)
|
Use the ones you received if you deployed [anix-player-parsers](./player-parsers/README.md) and/or [anix-api-prox](./api-prox/README.md)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -73,11 +74,12 @@ Requirements:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
7. (optional) Add variables to use your own player:
|
7. (optional) Add variables to use your own player and/or api-proxy:
|
||||||
|
|
||||||
- NEXT_PUBLIC_PLAYER_PARSER_URL
|
- NEXT_PUBLIC_PLAYER_PARSER_URL
|
||||||
|
- NEXT_PUBLIC_API_URL
|
||||||
|
|
||||||
Use the ones you received if you deployed [anix-player-parsers](./player-parsers/README.md)
|
Use the ones you received if you deployed [anix-player-parsers](./player-parsers/README.md) and/or [anix-api-prox](./api-prox/README.md)
|
||||||
|
|
||||||
1. 
|
1. 
|
||||||
|
|
||||||
|
@ -120,7 +122,7 @@ Additional Requirements:
|
||||||
- -p - container port to be exposed externally. PORT:3000
|
- -p - container port to be exposed externally. PORT:3000
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> For variables you received if you deployed [anix-player-parsers](./player-parsers/README.md), you need to use `-e VARIABLE=VALUE` before the last word anix
|
> For variables you received if you deployed [anix-player-parsers](./player-parsers/README.md) and/or [anix-api-prox](./api-prox/README.md), you need to use `-e VARIABLE=VALUE` before the last word anix
|
||||||
|
|
||||||
[docker run command](https://docs.docker.com/reference/cli/docker/container/run/)
|
[docker run command](https://docs.docker.com/reference/cli/docker/container/run/)
|
||||||
|
|
||||||
|
@ -150,7 +152,7 @@ Instructions:
|
||||||
1. Clone the repository `git clone https://github.com/Radiquum/AniX`
|
1. Clone the repository `git clone https://github.com/Radiquum/AniX`
|
||||||
2. Navigate to the repository directory `cd AniX`
|
2. Navigate to the repository directory `cd AniX`
|
||||||
3. Run the command `npm install`
|
3. Run the command `npm install`
|
||||||
4. (optional) copy `.env.sample` as `.env` and fill it with variables you received if you deployed [anix-player-parsers](./player-parsers/README.md)
|
4. (optional) copy `.env.sample` as `.env` and fill it with variables you received if you deployed [anix-player-parsers](./player-parsers/README.md) and/or [anix-api-prox](./api-prox/README.md)
|
||||||
5. Run the command `npm run build`
|
5. Run the command `npm run build`
|
||||||
6. Create a new directory (next we will be refer to its name as `<new_dir>`)
|
6. Create a new directory (next we will be refer to its name as `<new_dir>`)
|
||||||
7. Move the following files into the new directory (`<new_dir>`):
|
7. Move the following files into the new directory (`<new_dir>`):
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
export const CURRENT_APP_VERSION = "3.7.0";
|
export const CURRENT_APP_VERSION = "3.7.0";
|
||||||
|
import { env } from "next-runtime-env";
|
||||||
|
|
||||||
|
const NEXT_PUBLIC_API_URL = env("NEXT_PUBLIC_API_URL") || null;
|
||||||
export const API_URL = "https://api.anixart.app";
|
export const API_URL = "https://api.anixart.app";
|
||||||
export const API_PREFIX = "/api/proxy";
|
export const API_PREFIX = NEXT_PUBLIC_API_URL || "/api/proxy";
|
||||||
export const USER_AGENT =
|
export const USER_AGENT =
|
||||||
"AnixartApp/9.0 BETA 5-25062213 (Android 9; SDK 28; arm64-v8a; samsung SM-G975N; en)";
|
"AnixartApp/9.0 BETA 5-25062213 (Android 9; SDK 28; arm64-v8a; samsung SM-G975N; en)";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue