- Clone repository
- Install .NET 7 SDK https://dotnet.microsoft.com/en-us/download/dotnet/7.0
- Install node.js https://nodejs.org/en/download/
- Install pnpm https://pnpm.io/installation
Best results installing with:
npm install -g pnpm
- Install node dependencies
cd LegoSorterWeb/
cd ClientApp/
pnpm install
- Build
cd ..
dotnet publish -c Release
- Run
dotnet published/LegoSorterWeb.dll
- Clone repository
- Build docker image
Run from repository root (directory containing README.md)
docker build -t lego_gui -f .\LegoSorterWeb\Dockerfile .
- Create directory to save database
- Copy database file to new directory
Copy
LegoSorterWeb\Database\LegoSorterWebDB.sqlite3
to new directory - Create container
Windows (PowerShell) example:
docker run -d -p 5002:80 --restart unless-stopped --name lego_gui_sample `
--mount type=bind,source=//g/LEGO/.net7test/db,destination=/app/Database lego_gui
- If LegoSorterServer is running on different machine change ip here: http://ip:5002/config
Running without mount will work database will keep data between container restarts, but data will be lost after updating container:
docker run -d -p 5002:80 --restart unless-stopped --name lego_gui_sample lego_gui