feat: add deploy instructions
180
DEPLOYMENT.RU.md
Normal file
|
@ -0,0 +1,180 @@
|
|||
# Развёртывание приложения AniX
|
||||
|
||||
## Vercel
|
||||
|
||||
Требования:
|
||||
|
||||
- аккаунт GitHub
|
||||
- аккаунт Vercel
|
||||
|
||||
1. сделайте форк репозитория
|
||||
|
||||

|
||||
|
||||
2. Войдите в аккаунт vercel
|
||||
|
||||
> [!IMPORTANT]
|
||||
>Аккаунт Vercel должен быть связан с аккаунтом Github.
|
||||
>
|
||||
>Если у вас нет аккаунта vercel, то создайте его через вход с помощью Github.
|
||||
|
||||
3. Нажмите кнопку создать новый проект
|
||||
|
||||

|
||||
|
||||
4. Нажмите кнопку импортировать напротив названия репозитория
|
||||
|
||||

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

|
||||
|
||||
6. нажмите кнопку "Deploy" и ожидайте пока не появиться подтверждение
|
||||
7. нажмите кнопку "Continue to Dashboard"
|
||||
8. клиент будет доступен по ссылке такого вида, нажмите на неё что-бы его открыть
|
||||

|
||||
|
||||
## Netlify
|
||||
|
||||
Требования:
|
||||
|
||||
- аккаунт GitHub
|
||||
- аккаунт Netlify
|
||||
|
||||
1. сделайте форк репозитория
|
||||
|
||||

|
||||
|
||||
2. Войдите в аккаунт netlify
|
||||
|
||||
> [!IMPORTANT]
|
||||
>Аккаунт Netlify должен быть связан с аккаунтом Github.
|
||||
>
|
||||
>Если у вас нет аккаунта Netlify, то создайте его через вход с помощью Github.
|
||||
|
||||
3. Нажмите кнопку создать новый проект
|
||||
|
||||

|
||||
|
||||
4. Нажмите кнопку GitHub
|
||||
|
||||

|
||||
|
||||
5. Нажмите на название репозитория
|
||||
|
||||

|
||||
|
||||
6. (опционально) заполните название проекта
|
||||
|
||||

|
||||
|
||||
7. (опционально) добавьте переменные для использования своего плеере:
|
||||
|
||||
- NEXT_PUBLIC_KODIK_PARSER_URL
|
||||
- NEXT_PUBLIC_ANILIBRIA_PARSER_URL
|
||||
- NEXT_PUBLIC_SIBNET_PARSER_URL
|
||||
|
||||
на те которые вы получили, если развёртывали [anix-player-parsers](./player-parsers/README.RU.md)
|
||||
|
||||
1. 
|
||||
|
||||
2. 
|
||||
|
||||
8. нажмите кнопку "Deploy" и ожидайте пока не появиться подтверждение
|
||||
|
||||
9. клиент будет доступен по ссылке такого вида, нажмите на неё что-бы его открыть
|
||||
|
||||

|
||||
|
||||
## Docker
|
||||
|
||||
Требования:
|
||||
|
||||
- [docker](https://docs.docker.com/engine/install/)
|
||||
|
||||
### Пре-билд
|
||||
|
||||
1. выполните комманду:
|
||||
|
||||
`docker run -d --name anix -p 3000:3000 radiquum/anix:latest`
|
||||
|
||||
### Ручной билд
|
||||
|
||||
Доп. Требования:
|
||||
|
||||
- [git](https://git-scm.com/)
|
||||
|
||||
1. Клонируйте репозиторий `git clone https://github.com/Radiquum/AniX`
|
||||
2. Переместитесь в директорию репозитория `cd AniX`
|
||||
3. Выполните команду `docker build -t anix .`
|
||||
4. После окончания, выполните команду: `docker run -d --restart always --name anix -p 3000:3000 anix`
|
||||
|
||||
### docker/Обозначения
|
||||
|
||||
- -d - запустить контейнер в фоне
|
||||
- --restart always - всегда запускать после перезагрузки сервера
|
||||
- --name - название контейнера
|
||||
- -p - порт контейнера который будет доступен из вне. ПОРТ:3000
|
||||
|
||||
>[!NOTE]
|
||||
> для переменных которые вы получили, если развёртывали [anix-player-parsers](./player-parsers/README.RU.md), необходимо использовать `-e ПЕРЕМЕННАЯ=ЗНАЧЕНИЕ` до слова anix
|
||||
|
||||
[команда docker run](https://docs.docker.com/reference/cli/docker/container/run/)
|
||||
|
||||
### docker/После развёртывания
|
||||
|
||||
Сервис будет доступен по адресу: `http://<ВАШ IP><:ВАШ ПОРТ>/`
|
||||
|
||||
### docker/Примечание
|
||||
|
||||
Для использования своего домена и поддержки протокола https, вы можете использовать traefik или другой reverse-proxy, с сертификатом SSL.
|
||||
|
||||
Полезные ссылки:
|
||||
|
||||
- [Конвертер из команды docker run в синтакс для docker compose](https://it-tools.tech/docker-run-to-docker-compose-converter)
|
||||
- [Как настроить traefik + свой домен + SSL](https://letmegooglethat.com/?q=how+to+setup+traefik+with+custom+domain+and+ssl+certificate+from+lets+encrypt%3F)
|
||||
|
||||
## pm2
|
||||
|
||||
Требования:
|
||||
|
||||
- [git](https://git-scm.com/)
|
||||
- [nodejs 23+ с npm](http://nodejs.org/)
|
||||
- [pm2](https://pm2.keymetrics.io/)
|
||||
|
||||
Инструкция:
|
||||
|
||||
1. Клонируйте репозиторий `git clone https://github.com/Radiquum/AniX`
|
||||
2. Переместитесь в директорию репозитория `cd AniX`
|
||||
3. Выполните команду `npm install`
|
||||
4. (опционально) скопируйте .env.sample как .env и заполните его переменными которые вы получили, если развёртывали [anix-player-parsers](./player-parsers/README.RU.md)
|
||||
5. Выполните команду `npm run build`
|
||||
6. создайте новую директорию
|
||||
7. переместите в созданную директорию
|
||||
- директорию `public` в `./новая/public`
|
||||
- директорию `.next/static` в `./новая/.next/static`
|
||||
- файлы из `.next/standalone` в `./новая`
|
||||
8. Переместитесь в созданную директорию и выполните команду `pm2 start server.js -n anix`
|
||||
|
||||
### pm2/Обозначения
|
||||
|
||||
- -n - название сервиса в pm2
|
||||
|
||||
### pm2/После развёртывания
|
||||
|
||||
Сервис будет доступен по адресу: `http://<ВАШ IP>:3000/`
|
||||
|
||||
### pm2/Примечание
|
||||
|
||||
Для автоматического запуска приложения, рекомендуется настроить pm2 на автозапуск, с помощью команды: `pm2 startup`
|
||||
|
||||
Полезные ссылки:
|
||||
|
||||
- [PM2: подходим к вопросу процесс-менеджмента с умом @ Habr](https://habr.com/ru/articles/480670/)
|
180
DEPLOYMENT.md
Normal file
|
@ -0,0 +1,180 @@
|
|||
# AniX Application Deployment
|
||||
|
||||
## Vercel
|
||||
|
||||
Requirements:
|
||||
|
||||
- GitHub account
|
||||
- Vercel account
|
||||
|
||||
1. Fork the repository
|
||||
|
||||

|
||||
|
||||
2. Log in to your Vercel account
|
||||
|
||||
> [!IMPORTANT]
|
||||
>Your Vercel account must be linked with your GitHub account.
|
||||
>
|
||||
>If you don't have a Vercel account, create one by signing in with GitHub.
|
||||
|
||||
3. Click the button to create a new project
|
||||
|
||||

|
||||
|
||||
4. Click the import button next to the repository name
|
||||
|
||||

|
||||
|
||||
5. (optional) Add variables to use your own player:
|
||||
|
||||
- NEXT_PUBLIC_KODIK_PARSER_URL
|
||||
- NEXT_PUBLIC_ANILIBRIA_PARSER_URL
|
||||
- NEXT_PUBLIC_SIBNET_PARSER_URL
|
||||
|
||||
Use the ones you received if you deployed [anix-player-parsers](./player-parsers/README.md)
|
||||
|
||||

|
||||
|
||||
6. Click the "Deploy" button and wait until you see a confirmation
|
||||
7. Click the "Continue to Dashboard" button
|
||||
8. The client will be available at a link of this form, click it to open
|
||||

|
||||
|
||||
## Netlify
|
||||
|
||||
Requirements:
|
||||
|
||||
- GitHub account
|
||||
- Netlify account
|
||||
|
||||
1. Fork the repository
|
||||
|
||||

|
||||
|
||||
2. Log in to your Netlify account
|
||||
|
||||
> [!IMPORTANT]
|
||||
>Your Netlify account must be linked with your GitHub account.
|
||||
>
|
||||
>If you don't have a Netlify account, create one by signing in with GitHub.
|
||||
|
||||
3. Click the button to create a new project
|
||||
|
||||

|
||||
|
||||
4. Click the GitHub button
|
||||
|
||||

|
||||
|
||||
5. Click the repository name
|
||||
|
||||

|
||||
|
||||
6. (optional) Fill in the project name
|
||||
|
||||

|
||||
|
||||
7. (optional) Add variables to use your own player:
|
||||
|
||||
- NEXT_PUBLIC_KODIK_PARSER_URL
|
||||
- NEXT_PUBLIC_ANILIBRIA_PARSER_URL
|
||||
- NEXT_PUBLIC_SIBNET_PARSER_URL
|
||||
|
||||
Use the ones you received if you deployed [anix-player-parsers](./player-parsers/README.md)
|
||||
|
||||
1. 
|
||||
|
||||
2. 
|
||||
|
||||
8. Click the "Deploy" button and wait until you see a confirmation
|
||||
|
||||
9. The client will be available at a link of this form, click it to open
|
||||
|
||||

|
||||
|
||||
## Docker
|
||||
|
||||
Requirements:
|
||||
|
||||
- [docker](https://docs.docker.com/engine/install/)
|
||||
|
||||
### Pre-built
|
||||
|
||||
1. Run the command:
|
||||
|
||||
`docker run -d --name anix -p 3000:3000 radiquum/anix:latest`
|
||||
|
||||
### Manual build
|
||||
|
||||
Additional Requirements:
|
||||
|
||||
- [git](https://git-scm.com/)
|
||||
|
||||
1. Clone the repository `git clone https://github.com/Radiquum/AniX`
|
||||
2. Navigate to the repository directory `cd AniX`
|
||||
3. Run the command `docker build -t anix .`
|
||||
4. Once finished, run the command: `docker run -d --restart always --name anix -p 3000:3000 anix`
|
||||
|
||||
### docker/Flags
|
||||
|
||||
- -d - run container in background
|
||||
- --restart always - always restart after server reboot
|
||||
- --name - container name
|
||||
- -p - container port to be exposed externally. PORT:3000
|
||||
|
||||
>[!NOTE]
|
||||
> For variables you received if you deployed [anix-player-parsers](./player-parsers/README.md), you need to use `-e VARIABLE=VALUE` before the word anix
|
||||
|
||||
[docker run command](https://docs.docker.com/reference/cli/docker/container/run/)
|
||||
|
||||
### docker/After deployment
|
||||
|
||||
The service will be available at: `http://<YOUR IP><:YOUR PORT>/`
|
||||
|
||||
### docker/Note
|
||||
|
||||
To use your own domain and support HTTPS protocol, you can use traefik or another reverse proxy with SSL certificate.
|
||||
|
||||
Useful links:
|
||||
|
||||
- [Converter from docker run command to docker compose syntax](https://it-tools.tech/docker-run-to-docker-compose-converter)
|
||||
- [How to setup traefik + custom domain + SSL](https://letmegooglethat.com/?q=how+to+setup+traefik+with+custom+domain+and+ssl+certificate+from+lets+encrypt%3F)
|
||||
|
||||
## pm2
|
||||
|
||||
Requirements:
|
||||
|
||||
- [git](https://git-scm.com/)
|
||||
- [nodejs 23+ with npm](http://nodejs.org/)
|
||||
- [pm2](https://pm2.keymetrics.io/)
|
||||
|
||||
Instructions:
|
||||
|
||||
1. Clone the repository `git clone https://github.com/Radiquum/AniX`
|
||||
2. Navigate to the repository directory `cd AniX`
|
||||
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)
|
||||
5. Run the command `npm run build`
|
||||
6. Create a new directory
|
||||
7. Move into the new directory:
|
||||
- move `public` directory to `./new/public`
|
||||
- move `.next/static` directory to `./new/.next/static`
|
||||
- move files from `.next/standalone` to `./new`
|
||||
8. Move into the created directory and run the command `pm2 start server.js -n anix`
|
||||
|
||||
### pm2/Flags
|
||||
|
||||
- -n - service name in pm2
|
||||
|
||||
### pm2/After deployment
|
||||
|
||||
The service will be available at: `http://<YOUR IP>:3000/`
|
||||
|
||||
### pm2/Note
|
||||
|
||||
To enable automatic application startup, it is recommended to configure pm2 to start on boot using the command: `pm2 startup`
|
||||
|
||||
Useful links:
|
||||
|
||||
- [PM2: managing processes smartly @ Habr](https://habr.com/ru/articles/480670/)
|
BIN
docs/deploy/fork.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
docs/deploy/netlify_env_1.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
docs/deploy/netlify_env_2.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
docs/deploy/netlify_import.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
docs/deploy/netlify_new_project.png
Normal file
After Width: | Height: | Size: 7 KiB |
BIN
docs/deploy/netlify_project_name.png
Normal file
After Width: | Height: | Size: 7 KiB |
BIN
docs/deploy/netlify_provider.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
docs/deploy/netlify_url.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
docs/deploy/vercel_import.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
docs/deploy/vercel_new_project.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
docs/deploy/vercel_project.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
docs/deploy/vercel_url.png
Normal file
After Width: | Height: | Size: 70 KiB |
|
@ -36,8 +36,7 @@
|
|||
>
|
||||
> Из-за данной специфики, парсеры невозможно развернуть на edge сервисах, таких как CloudFlare Workers или Deno, а только на отдельном сервере.
|
||||
|
||||
<details>
|
||||
<summary>С помощью docker</summary>
|
||||
### Docker
|
||||
|
||||
Требования:
|
||||
|
||||
|
@ -61,18 +60,18 @@
|
|||
4. Выполните команду `docker build -t anix-player-parser .`
|
||||
5. После окончания, выполните команду: `docker run -d --restart always --name anix-player -p 7000:7000 anix-player-parser`
|
||||
|
||||
### Обозначения
|
||||
### docker/Обозначения
|
||||
|
||||
- -d - запустить контейнер в фоне
|
||||
- --restart always - всегда запускать после перезагрузки сервера
|
||||
- --name - название контейнера
|
||||
- -p - порт контейнера который будет доступен из вне. ПОРТ:7000
|
||||
|
||||
### После развёртывания
|
||||
### docker/После развёртывания
|
||||
|
||||
Сервис будет доступен по адресу: `http://<ВАШ IP><:ВАШ ПОРТ>/`
|
||||
|
||||
### Примечание
|
||||
### docker/Примечание
|
||||
|
||||
Для использования своего домена и поддержки протокола https, вы можете использовать traefik или другой reverse-proxy, с сертификатом SSL.
|
||||
|
||||
|
@ -83,8 +82,7 @@
|
|||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>С помощью pm2</summary>
|
||||
### pm2
|
||||
|
||||
Требования:
|
||||
|
||||
|
@ -100,20 +98,18 @@
|
|||
4. Выполните команду `npm install`
|
||||
5. После окончания, Выполните команду `pm2 start index.ts -n anix-player-parser`
|
||||
|
||||
### Обозначения
|
||||
### pm2/Обозначения
|
||||
|
||||
- -n - название сервиса в pm2
|
||||
|
||||
### После развёртывания
|
||||
### pm2/После развёртывания
|
||||
|
||||
Сервис будет доступен по адресу: `http://<ВАШ IP>:7000/`
|
||||
|
||||
### Примечание
|
||||
### pm2/Примечание
|
||||
|
||||
Для автоматического запуска приложения, рекомендуется настроить pm2 на автозапуск, с помощью команды: `pm2 startup`
|
||||
|
||||
Полезные ссылки:
|
||||
|
||||
- [PM2: подходим к вопросу процесс-менеджмента с умом @ Habr](https://habr.com/ru/articles/480670/)
|
||||
|
||||
</details>
|
|
@ -36,8 +36,7 @@ Response:
|
|||
>
|
||||
> Because of this specificity, the parsers cannot be deployed on edge services like CloudFlare Workers or Deno, only on a dedicated server.
|
||||
|
||||
<details>
|
||||
<summary>Using docker</summary>
|
||||
### Docker
|
||||
|
||||
Requirements:
|
||||
|
||||
|
@ -61,18 +60,18 @@ Additional Requirements:
|
|||
4. Run the command `docker build -t anix-player-parser .`
|
||||
5. Once finished, run the command: `docker run -d --restart always --name anix-player -p 7000:7000 anix-player-parser`
|
||||
|
||||
### Legend
|
||||
### docker/Legend
|
||||
|
||||
- -d - run the container in background
|
||||
- --restart always - always restart after server reboot
|
||||
- --name - container name
|
||||
- -p - container port accessible externally. PORT:7000
|
||||
|
||||
### After deployment
|
||||
### docker/After deployment
|
||||
|
||||
The service will be available at: `http://<YOUR IP><:YOUR PORT>/`
|
||||
|
||||
### Note
|
||||
### docker/Note
|
||||
|
||||
To use your own domain and support the https protocol, you can use traefik or another reverse-proxy with an SSL certificate.
|
||||
|
||||
|
@ -83,8 +82,7 @@ Useful links:
|
|||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Using pm2</summary>
|
||||
### pm2
|
||||
|
||||
Requirements:
|
||||
|
||||
|
@ -100,20 +98,18 @@ Instructions:
|
|||
4. Run the command `npm install`
|
||||
5. Once finished, Run the command `pm2 start index.ts -n anix-player-parser`
|
||||
|
||||
### Legend
|
||||
### pm2/Legend
|
||||
|
||||
- -n - service name in pm2
|
||||
|
||||
### After deployment
|
||||
### pm2/After deployment
|
||||
|
||||
The service will be available at: `http://<YOUR IP>:7000/`
|
||||
|
||||
### Note
|
||||
### pm2/Note
|
||||
|
||||
To enable automatic application start, it is recommended to configure pm2 to start on boot with the command: `pm2 startup`
|
||||
|
||||
Useful links:
|
||||
|
||||
- [PM2: smart approach to process management @ Habr](https://habr.com/ru/articles/480670/)
|
||||
|
||||
</details>
|
||||
|
|