CLI and Publish Tests
@@ -56,12 +56,12 @@
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "Changing Factions and Immortal should clear out build.md",
|
||||
"file": "Build Calculator CmdLine.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "Changing Factions and Immortal should clear out build"
|
||||
"title": "Build Calculator CmdLine"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -122,7 +122,7 @@
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 200
|
||||
"width": 508.5
|
||||
},
|
||||
"right": {
|
||||
"id": "dd7c1dc4bd54d927",
|
||||
@@ -240,41 +240,44 @@
|
||||
"active": "b98a69cefb529fc8",
|
||||
"lastOpenFiles": [
|
||||
"_Tasks Kanban.base",
|
||||
"Helper Tutorial Info Improvements.md",
|
||||
"Highest Alloy and Ether Tests.md",
|
||||
"Army Display Split.md",
|
||||
"Timeline Tests.md",
|
||||
"Army Calc UI.md",
|
||||
"Hotkey Tests.md",
|
||||
"Entity Click View Tests.md",
|
||||
"Untitled.md",
|
||||
"Top Borders in Calculator should change based on Selected Faction and Immortal.md",
|
||||
"Make a Plan to Fully Test the Calculator.md",
|
||||
"Untitled 1.md",
|
||||
"Add a Timeline Editor.md",
|
||||
"Worker Income UI and Tests.md",
|
||||
"More Wait Tests.md",
|
||||
"Build Clear should clear out more stuff.md",
|
||||
"Changing Factions and Immortal should clear out build.md",
|
||||
"Input building delay should have an effect on when a building is built. Tests against 0, 2, 4, 60.md",
|
||||
"Ensure build order gets greyed out past the attack time. Clicking the cancel button will wipe the entire greyed out timeline..md",
|
||||
"Pasted image 20260601093510.png",
|
||||
"Pasted image 20260601093506.png",
|
||||
"Pasted image 20260601083333.png",
|
||||
"Pasted image 20260601083206.png",
|
||||
"Pasted image 20260601083147.png",
|
||||
"Pasted image 20260601083127.png",
|
||||
"Pasted image 20260601083113.png",
|
||||
"Pasted image 20260601083101.png",
|
||||
"Pasted image 20260601083046.png",
|
||||
"Pasted image 20260601083030.png",
|
||||
"Jenkins CI.md",
|
||||
"AI Gen Docs/test-network-resilience.md",
|
||||
"Add some cooldown reference.md",
|
||||
"Add Co-op objective reference.md",
|
||||
"Add an Ability to Favourite Data.md",
|
||||
"AI Gen Docs/test-toast-timing-interactions.md",
|
||||
"AI Gen Docs/test-visual-regression.md",
|
||||
"Build Calculator CmdLine.md",
|
||||
"AI Help Docs/containerize-and-run.md",
|
||||
"AI Help Docs/publish-and-serve.md",
|
||||
"AI Gen Docs/test-multi-context-entity-comparison.md",
|
||||
"AI Gen Docs/services.md",
|
||||
"AI Gen Docs/recommendations.md",
|
||||
"AI Gen Docs/development.md",
|
||||
"AI Gen Docs/architecture.md",
|
||||
"Images/Pasted image 20260601083005.png",
|
||||
"Images/Pasted image 20260601082954.png",
|
||||
"Tasks/Plan Calculator.md",
|
||||
"Tasks/Remove Items from anywhere in the build calc timeline.md",
|
||||
"Tasks/Top Borders in Calculator should change based on Selected Faction and Immortal.md",
|
||||
"Tasks/Update the Reference Tables with Telerik.md",
|
||||
"Tasks/Worker Income UI and Tests.md",
|
||||
"Tasks/WebAssembly back to Azure.md",
|
||||
"Tasks/Spells are currently a production item in data. Make the a ability item so they don't show under production table.md",
|
||||
"Tasks/Nice looking map refrence.md",
|
||||
"Tasks/Add an Ability to Favourite Data.md",
|
||||
"Tasks/Add a Timeline Editor.md",
|
||||
"Tasks/Add Co-op objective reference.md",
|
||||
"Tasks/Entity Click View Tests.md",
|
||||
"Tasks/Make a Plan to Fully Test the Calculator.md",
|
||||
"Tasks/Make page object pattern structure for the Build Calculator and all it's components.md",
|
||||
"Tasks/More Wait Tests.md",
|
||||
"Images/Pasted image 20260601093510.png",
|
||||
"Tasks/Timeline Tests.md",
|
||||
"Tasks/Make Tests for the Build Calculator.md",
|
||||
"Images",
|
||||
"Images/Pasted image 20260601083019.png",
|
||||
"Images/Pasted image 20260601083046.png",
|
||||
"Images/Pasted image 20260601083101.png",
|
||||
"Images/Pasted image 20260601083113.png",
|
||||
"Tasks",
|
||||
"AI Help Docs",
|
||||
"Images/Pasted image 20260601093506.png",
|
||||
"Images/Pasted image 20260601083333.png",
|
||||
"Images/Pasted image 20260601083206.png",
|
||||
"AI Gen Docs",
|
||||
"AI Gen Tasks"
|
||||
]
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
# Containerizing the IGP App with Docker
|
||||
|
||||
## Steps Performed
|
||||
|
||||
### 1. Created a Multi‑Stage Dockerfile (`Dockerfile`)
|
||||
|
||||
Two stages:
|
||||
|
||||
| Stage | Image | Purpose |
|
||||
|---|---|---|
|
||||
| `build` | `mcr.microsoft.com/dotnet/sdk:10.0` | Restores dependencies, builds, and publishes the Blazor WASM app |
|
||||
| `final` | `nginx:alpine` | Copies the published `wwwroot/` output and a custom `nginx.conf` that serves it |
|
||||
|
||||
### 2. Created a Custom nginx Config (`nginx.conf`)
|
||||
|
||||
- Listens on port **8887** (not the default 80) so it doesn't conflict with other containers.
|
||||
- Adds Blazor‑required MIME types: `application/wasm` (`.wasm`), `application/octet-stream` (`.dll`, `.blat`, `.dat`, `.webcil`).
|
||||
- Enables `gzip_static` so pre‑compressed `.gz` variants are served automatically.
|
||||
- Implements SPA fallback: `try_files $uri $uri/ /index.html` for client‑side routing.
|
||||
|
||||
### 3. Built the Image
|
||||
|
||||
```
|
||||
docker build -t igp-app:latest -f Dockerfile .
|
||||
```
|
||||
|
||||
Result: `docker.io/library/igp-app:latest`
|
||||
|
||||
### 4. Ran the Container
|
||||
|
||||
```
|
||||
docker run -d --name igp-app -p 8887:8887 igp-app:latest
|
||||
```
|
||||
|
||||
The container is now serving at **http://localhost:8887**.
|
||||
|
||||
### 5. Verified
|
||||
|
||||
- `docker ps` shows the container `Up` and port mapping `0.0.0.0:8887->8887/tcp`.
|
||||
- `curl http://localhost:8887/` returns HTTP `200`.
|
||||
|
||||
## Files
|
||||
|
||||
| File | Purpose |
|
||||
|---|---|
|
||||
| `Dockerfile` | Multi‑stage build: .NET SDK → publish → nginx |
|
||||
| `nginx.conf` | nginx config with Blazor MIME types, gzip, SPA fallback, port 8887 |
|
||||
|
||||
## How to Stop
|
||||
|
||||
```
|
||||
docker stop igp-app
|
||||
docker rm igp-app
|
||||
```
|
||||
|
||||
## How to Rebuild
|
||||
|
||||
```
|
||||
docker build -t igp-app:latest -f Dockerfile .
|
||||
docker rm -f igp-app
|
||||
docker run -d --name igp-app -p 8887:8887 igp-app:latest
|
||||
```
|
||||
@@ -0,0 +1,51 @@
|
||||
# Publishing and Serving the IGP App Locally
|
||||
|
||||
## Steps Performed
|
||||
|
||||
### 1. Publish the Blazor WebAssembly App
|
||||
|
||||
Ran `dotnet publish` targeting Release configuration, outputting to `publish_release/`:
|
||||
|
||||
```
|
||||
dotnet publish .\IGP\IGP.csproj -c Release -o .\publish_release
|
||||
```
|
||||
|
||||
This produced a standard Blazor WASM publish layout:
|
||||
- `publish_release/wwwroot/` — static assets (HTML, CSS, JS, WASM, DLLs)
|
||||
- `publish_release/dotnet.js` — .NET runtime loader
|
||||
- `publish_release/web.config` — IIS configuration
|
||||
|
||||
### 2. Serve the Published Files on Port 8777
|
||||
|
||||
Wrote a small Node.js static file server (`serve_publish.cjs`) that:
|
||||
|
||||
- Serves files from `publish_release/wwwroot/`
|
||||
- Maps correct MIME types for `.wasm` ( `application/wasm` ), `.dll` ( `application/octet-stream` ), `.js` ( `application/javascript` ), `.br`, `.gz`
|
||||
- Implements SPA fallback: non-file routes serve `index.html` so Blazor's client-side routing works on refresh
|
||||
|
||||
```
|
||||
node serve_publish.cjs
|
||||
```
|
||||
|
||||
Server is now running at **http://localhost:8777**.
|
||||
|
||||
### 3. Verify
|
||||
|
||||
- `netstat -ano | findstr ":8777"` confirms the process is LISTENING
|
||||
- `curl -s -o NUL -w "%{http_code}" http://localhost:8777/` returns `200`
|
||||
|
||||
## How to Stop
|
||||
|
||||
Find the process and kill it:
|
||||
|
||||
```
|
||||
netstat -ano | findstr ":8777.*LISTENING"
|
||||
Stop-Process -Id <PID>
|
||||
```
|
||||
|
||||
## Files
|
||||
|
||||
| File | Purpose |
|
||||
|---|---|
|
||||
| `publish_release/wwwroot/` | Published static output |
|
||||
| `serve_publish.cjs` | Simple Node.js HTTP server with Blazor MIME support |
|
||||
@@ -0,0 +1,7 @@
|
||||
I want you to analyze the BuildCalculator and the services it uses to function.
|
||||
|
||||
Make a cmdline console app with C#, that will allow you to hand in a build order list and have the tool return the Army Attacking At and the displayed Alloy and Ether at the current time interval.
|
||||
|
||||
Try to share the service project. Add new logic where you have to, to make this console specification work.
|
||||
|
||||
Give me example text you would pass in to the console to make a build order that let's say, builds a Legion Hall with two Zentari.
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@@ -1,5 +0,0 @@
|
||||
---
|
||||
type: Task
|
||||
status:
|
||||
category:
|
||||
---
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
type: Task
|
||||
status:
|
||||
category:
|
||||
---
|
||||
@@ -23,7 +23,6 @@ views:
|
||||
- Done
|
||||
- AI Agent Work
|
||||
- AI Gen TODO
|
||||
- Uncategorized
|
||||
cardOrders:
|
||||
file.file:
|
||||
Untitled.base: []
|
||||
@@ -56,8 +55,8 @@ views:
|
||||
- More Wait Tests.md
|
||||
- Timeline Tests.md
|
||||
Working On:
|
||||
- Helper Tutorial Info Improvements.md
|
||||
- Changing Factions and Immortal should clear out build.md
|
||||
- Helper Tutorial Info Improvements.md
|
||||
- Highest Alloy and Ether Tests.md
|
||||
Backlog:
|
||||
- Fully Test the Build Calculator.md
|
||||
|
||||