From 5e4ffa2c27c3e525fa84ec30e4d95c4488cad546 Mon Sep 17 00:00:00 2001 From: Blake Matthes Date: Tue, 30 Sep 2025 06:00:08 -0500 Subject: [PATCH] docs(install): refactoring on the install folder --- lstDocs/docs/install-extras/_category_.json | 7 - .../docs/{install-extras => install}/iis.md | 3 +- lstDocs/docs/install/install.md | 184 ++++++++++++++++++ .../{install-extras => install}/services.md | 5 +- lstDocs/docs/ocp/_category_.json | 2 +- 5 files changed, 190 insertions(+), 11 deletions(-) delete mode 100644 lstDocs/docs/install-extras/_category_.json rename lstDocs/docs/{install-extras => install}/iis.md (97%) create mode 100644 lstDocs/docs/install/install.md rename lstDocs/docs/{install-extras => install}/services.md (95%) diff --git a/lstDocs/docs/install-extras/_category_.json b/lstDocs/docs/install-extras/_category_.json deleted file mode 100644 index c2c04b8..0000000 --- a/lstDocs/docs/install-extras/_category_.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "label": "Install", - "position": 3, - "link": { - "type": "generated-index" - } -} diff --git a/lstDocs/docs/install-extras/iis.md b/lstDocs/docs/install/iis.md similarity index 97% rename from lstDocs/docs/install-extras/iis.md rename to lstDocs/docs/install/iis.md index 7c51551..cb3dcca 100644 --- a/lstDocs/docs/install-extras/iis.md +++ b/lstDocs/docs/install/iis.md @@ -1,5 +1,6 @@ --- -sidebar_position: 2 +sidebar_position: 3 +id: install-iis --- # Runing in IIS (Internet Information Services) diff --git a/lstDocs/docs/install/install.md b/lstDocs/docs/install/install.md new file mode 100644 index 0000000..384d511 --- /dev/null +++ b/lstDocs/docs/install/install.md @@ -0,0 +1,184 @@ +--- +sidebar_position: 1 +id: install +--- + +# Install Process + +Get the latest build **From Azure**. + + + +### What you'll need + +- [Node.js](https://nodejs.org/en/download/) version 22.18 or above: + + - When installing Node.js, you are recommended to check all checkboxes related to dependencies. + +- [VS Code](https://code.visualstudio.com/download): + + - If you plant to contribute or need to tweak some data this is the recommended editor. + - During the app install updates and minor changes we will always be refering to VScode + +- [Notepad ++](https://notepad-plus-plus.org/); + + - An alternate solution to doing minor edits to the app including changes to the .env file + +- [NSSM](https://nssm.cc/); + + - This is used to create the services and required to be in the root of the app. + +- [Postgres](https://www.postgresql.org/download/); + - This is the DB of choice. + +## Other Items + +### Firewall rules + +If you will be using lst app on a tablet or scanner you will need to have 443 open +please request this from IT + +- Logistics network as the source +- Alpla prod server ip as the destination +- ports to open + - 443 # to access via https:// + - 3000 # This is in case you need to go direct to the app utlizing an ip:port + +## Creating the app + +Create a new directory where all you will host the app recommeneded + +```bash +E:\LST +``` + +Extract the build you downloaded from the repo. + +You should see something similar to + +```bash +LST/ +├── .vscode/ # vscode settings to match across all developers/contributors +│ ├── settings.json +├── controller/ +│ ├── main.go +│ ├── build_app.go +│ ├── bump_build.go +│ ├── zip_app.go +├── dist # Main backend +│ ├── internal +│ ├── db +│ ├── main.js +├── frontend/ +│ ├── dist # Frontend app +│ ├── public +├── lstDocs/ +│ ├── build # Docs on the entire app +├── lstWrapper/ +│ │ ├── LastWrapper.exe +│ │ ├── LstWRapper.dll +│ │ ├── webconfig.xml +│ │ ├── several other files related to the wrapper +├── scripts/ +│ │ ├── services.ps1 #service controler +├── .env-example +├── nssm.exe +├── package.json +├── package-lock.json +├── README.md +├── CHANGELOG.md +├── Dockerfile +├── docker-compose.yml +├── drizzle.config.ts +├── migrations # for all the db migrations +├── LICENSE +``` + +## Doing the intial setup + +Make sure you have installed both + +- VScode +- Node + +### Installing dep + +open the app in vs code +open terminal + +![](/img/install/terminal.png) + +run the install command + +```bash +npm run install +``` + +### Creating the env + +Create a copy of the .env-example file and rename it .env + +Please review all comments in the env file to make sure you are only change what is needed to be change. + +```bash +# server port - should only be changed if you really need this changed as its linked to the wrapper +VITE_PORT=4000 + +# TMS AccoutINFO - This is for Transport Insight only +USERID=ALPLAWS +PASSWORD=password +REQUESTUSER="ALPLAIMPORT" + +# logLevel +LOG_LEVEL=debug + +# alpaprod tec apiKey +TEC_API_KEY=apikey + +# postgres db +DATABASE_HOST=localhost +DATABASE_PORT=5432 +DATABASE_USER=username +DATABASE_PASSWORD=supersecretpasswrod +DATABASE_DB=lst + +# prodServer +PROD_SERVER=usmcd1vms036 +PROD_PLANT_TOKEN=test3 +PROD_USER=alplaprod +PROD_PASSWORD=password +``` + +### DB setup + +Make sure you have installed Postrgres, and recommended to install PGAdmin + +After the install is completed please open PGAdmin and login with + +Create a new database and call it lst_db. + +NOTE\* You can change the db name you just need to match it to the same as name as you have set in the .env file + +back in the termnial run the following command + +```bash +npm run db:migrate +``` + +### First Startup + +Last step before moveing over to running as a service and running in iis please start up by running the below + +```bash +npm start +``` + +As this is the first time you will see a lot of logs and eventually see the system say Running. +Please visit +[http://localhost:4000](http://localhost:4000/) +to validate everything is running and create the intial user +by going to [Register](http://localhost:4000/register). + +Please note the first user created is the system admin user, after created you will be able to login and change settings and activate features, as most features are disabled by default. + +once you are ready to set this up and leave it head over to [Setting up As Service](/docs/install-extras/services) diff --git a/lstDocs/docs/install-extras/services.md b/lstDocs/docs/install/services.md similarity index 95% rename from lstDocs/docs/install-extras/services.md rename to lstDocs/docs/install/services.md index ce8fba9..bf7b14a 100644 --- a/lstDocs/docs/install-extras/services.md +++ b/lstDocs/docs/install/services.md @@ -1,5 +1,6 @@ --- -sidebar_position: 1 +sidebar_position: 2 +id: install-service --- # Run as a service @@ -38,7 +39,7 @@ This will completely stop the service and you will need to start it ## Start the Service -Yet again utlizeing the same script +Yet again utilizing the same script ```bash .\scripts\services.ps1 -serviceName "LST_app" -option "start" -appPath "E:\LST" diff --git a/lstDocs/docs/ocp/_category_.json b/lstDocs/docs/ocp/_category_.json index c476def..8cfc818 100644 --- a/lstDocs/docs/ocp/_category_.json +++ b/lstDocs/docs/ocp/_category_.json @@ -1,6 +1,6 @@ { "label": "One Click Print", - "position": 4, + "position": 1, "link": { "type": "generated-index" }