Установка exchanger-web
Prepare dependencies
apt install -y nano sudo curl wget
apt update
apt upgrade -y1. Install Docker and Docker Compose
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh2. Create runner user and add it to sudoers
sudo adduser --disabled-password --gecos "" runner
sudo usermod -aG sudo runner3. Create docker group and add user to it
sudo usermod -aG docker runner4. Switch to a 'runner' user
sudo su runnernewgrp docker5. Create docker network
docker network create --subnet 10.1.0.0/24 exchanger-net6. Docker login
Create a Personal Access Token in GitLab
Make sure to tick the
read_registrypermission scopeCreate a reminder to update the PAT after expiration date, as once it expires you lose access for updates. https://git.boxexchanger.net/-/profile/personal_access_tokens
Login to docker read_registry
7. Create required folders
8. Place basic nginx config server_names_hash_bucket_size.conf
server_names_hash_bucket_size.confwith content:
9. Place basic nginx config nginx_default.conf
nginx_default.confwith content:
10. Place Nginx nginx_admin.conf config
nginx_admin.conf config11. Place Nginx nginx_web.conf config
nginx_web.conf config12. Create config file (.env)
12. Create your docker-compose.yml
13. Start WEB server
Server Side Render:
Attention! This mod is not recommended for use; it creates a load on the server to build the project for each client, which greatly increases the delay in loading the site
To enable SSR mode add variable SSR = 1 in your account https://licence.boxexchanger.net/licenses/ then run pipeline for build project and fetch build on your server.
1. Подготовка окружения
После установки сервера к нему необходимо подключиться по SSH и настроить окружение
Установить пакеты сервера (nano git curl)
Установить Nginx:
Установить NodeJS:
Установка NodeJs2. Скачать ПО на сервер
Создаем SSH-ключ
Документация с github.com Создание нового ключа SSH
Учебник по Linux
> Enter x3
Получить свой ключ:
Скопируйте результат и установите данный ключ в своей учётной записи git.boxexchanger.net
Доступ к исходному кодуКлонируем репозитории
3. Сборка админ панели
Сконфигурируйте конфигурацию:
Сборка проекта:
4. Сборка веб-панели
Сконфигурируйте конфигурацию: (при возникновении затруднений обратитесь в техподдержку [email protected])
Сборка проекта:
5. Применяем Nginx конфигурацию
Тестируем nginx конфигурацию:
Применяем изменения:
Last updated
Was this helpful?