Skip to content

Commit 606cfdc

Browse files
committed
Updated instructions and readme.
1 parent ffed947 commit 606cfdc

2 files changed

Lines changed: 40 additions & 1 deletion

File tree

.github/copilot-instructions.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ links, and growing to include more complex features over time.
3939
- Launch profiles/ports are in `h2s/Properties/launchSettings.json`.
4040
- There is currently no test project in this workspace; validate changes with build + manual page checks.
4141
- In production, the app will be hosted in a container, built using the `h2s/Dockerfile`. The container expects the database file to be mounted at `/app/data/h2s.db`.
42+
- Container publish automation lives in `.github/workflows/publish-container.yml`:
43+
- Triggered by tag pushes and manual runs.
44+
- For tag pushes, publish only occurs when the tagged commit is on `master`.
45+
- For manual runs, the workflow publishes using the latest git tag.
46+
- Images are pushed to GitHub Container Registry (`ghcr.io/<owner>/<repo>`) with both `<tag>` and `latest` tags.
4247

4348
## Code-change guidance for agents
4449
- Prefer Razor Pages patterns already used here (not MVC controllers or Blazor components).

README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,35 @@
1-
# h2s
1+
# h2s
2+
3+
h2s is an ASP.NET Core Razor Pages intranet dashboard app.
4+
5+
It stores dashboard data in SQLite using EF Core and is designed to run both locally and in a container.
6+
7+
## Run locally
8+
9+
From the repository root:
10+
11+
```bash
12+
dotnet run --project h2s/h2s.csproj
13+
```
14+
15+
## Build the container
16+
17+
From the repository root:
18+
19+
```bash
20+
docker build -t h2s:local -f h2s/Dockerfile h2s
21+
```
22+
23+
## Run the container
24+
25+
Create a local folder for persistent data, then run:
26+
27+
```bash
28+
docker run --rm -p 8080:8080 -e ASPNETCORE_URLS=http://+:8080 -v "$(pwd)/data:/app/data" h2s:local
29+
```
30+
31+
The app expects the SQLite database at `/app/data/h2s.db` inside the container.
32+
33+
## Container publishing
34+
35+
A GitHub Actions workflow (`.github/workflows/publish-container.yml`) publishes images to GitHub Container Registry when a tag is pushed (if the tag commit is on `master`) or when manually dispatched (using the latest tag).

0 commit comments

Comments
 (0)