Skip to content

Server-side APIs

The documentation applies to:✅ v0.8.0

Deployment Checklist

There are a checklist for helping you to ensure a deployment is successful.

  • Install MongoDB for Centralized Logs
  • Run letportal portal install and letportal identity install if a database is empty
  • Check the configuration files which match your target environment such as public endpoint, connection string, etc.
  • Check your firewall rules on in/out

Dotnet CLI

If you want to deploy one by one .NET Core project, so you can use Dotnet CLI for publishing an executable package.

Reference docs

Warning

You should use cd to stay on the same folder of *.csproj. For example: you want to deploy IdentityAPIs, you need to stay on src\LetPortal.IdentityApis\

``` bash tab="window os x64" dotnet build -c Release -o "./Publish" -r win10-x64

``` bash tab="linux x64"
dotnet build -c Release -o "./Publish" -r linux-x64

Then you move to your publish folder, use this command to run

``` bash tab="window os x64" $Env:ASPNETCORE_ENVIRONMENT="Local"

dotnet LetPortal.IdentityApis.dll

``` bash tab="linux x64"
export ASPNETCORE_ENVIRONMENT=Local

dotnet LetPortal.IdentityApis.dll

LET Portal script

For reducing your time, LET Portal also provides some scripts which help you to run all services as one. It is only available when you choose to deploy on one VM.

These scripts locate on src\web-apis\, please ensure you don't move these files away.

Publish all services

``` powershell tab="window" .\publish-win.ps1 "C:\Publish"

``` bash tab="linux"
sudo ./publish-lnx.sh ~/.letportal-pub

Run all services

``` powershell tab="window" .\run-win.ps1 "C:\Publish" "Local"

``` bash tab="linux"
sudo ./run-lnx.sh ~/.letportal-pub Local

Install screen

On Linux, you MUST to install screen command before running run-lnx.sh

Linux screen

If you want to check services are running on Linux, you need to use this command below

``` bash tab="Linux" sudo screen -ls

So the result should be

``` bash
23242.letportal-gw (Detached)
23222.letportal-id (Detached)
23342.letportal-pt (Detached)
23252.letportal-sm (Detached)

For checking each service, you need to use

sudo screen -r {letportal-gw | letportal-id | letportal-pt | letportal-sm }
Shutdown

On Windows, you just close four command line windows, but on Linux, you need to run this command

sudo .\shutdown-lnx.sh