Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ docs/
**/*.Tests/

# Deployment scripts
deploy.ps1
deploy.sh

docker-compose.yml
docker-compose.*.yml

Expand Down
4 changes: 1 addition & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ Tests under `tests/` mirroring structure:
- ASP.NET Core API
- EF Core + Npgsql (PostgreSQL)
- xUnit (unit tests) + Shouldly OR built-in Assert (NO FluentAssertions, NO AutoFixture)
- Bogus (optional) only if lightweight test data required (avoid over-randomization)
- Mapping: manual or source generators (avoid AutoMapper until justified)
- Validation: FluentValidation (if adopted) OR minimal custom validation; keep consistent.

## 5. Naming & Conventions
- C# Style: PascalCase types/members (except local variables & private fields). Private fields: `_camelCase`.
Expand Down Expand Up @@ -235,6 +233,6 @@ Keep this file lean—prune when obsolete. Update when architectural decisions s
- **Dockerfile**: Multi-stage build (`Dockerfile`) - builds from source, no pre-build required.
- **Deployment**: Raspberry Pi uses `docker-compose.pi.yml` to pull and run images from ghcr.io.
- **Database Connection**: Passed via environment variable `ConnectionStrings__AppDb` from `.env` file (never committed).
- **Legacy Scripts**: Local build scripts (`build-docker-windows.ps1`, `deploy-to-pi.ps1`, etc.) moved to `legacy-scripts/` and deprecated.
- **Legacy Scripts**: All legacy local build/deploy scripts (e.g., `build-docker-windows.ps1`, `deploy-to-pi.ps1`, `deploy.sh`) have been removed from the repository. Do not add or reference local Docker scripts. Use CI/CD-built images and deploy by pulling with `docker compose` on the target device.
- **Documentation**: See `README.Docker.md` for deployment guide, `DEPLOY-QUICKSTART.md` for quick Pi setup.
- **Important**: Do NOT create or suggest local Docker build workflows. Direct users to CI/CD pipeline or standard .NET local development.
73 changes: 17 additions & 56 deletions DEPLOY-QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,35 +166,21 @@ Open a browser and navigate to:# Test passwordless login



## Common Commands### Option 1: One-Command Deployment (Easiest)



```bashFrom your Windows machine, in the project root directory:
## Common Commands

```bash
# View logs
docker compose -f docker-compose.pi.yml logs -f

docker compose -f docker-compose.pi.yml logs -f```powershell

# Replace 'raspberry-pi.local' with your Pi's hostname or IP address

# Stop application.\deploy-to-pi.ps1 -PiHost raspberry-pi.local -PiUser pi

docker compose -f docker-compose.pi.yml stop```



# Start applicationThis single command will:

docker compose -f docker-compose.pi.yml start1. ✅ Run all unit tests

2. ✅ Build the application for ARM64

# Update to latest version3. ✅ Create a Docker image
# Stop application
docker compose -f docker-compose.pi.yml stop

docker compose -f docker-compose.pi.yml pull4. ✅ Transfer everything to your Pi
# Start application
docker compose -f docker-compose.pi.yml start

docker compose -f docker-compose.pi.yml up -d5. ✅ Deploy and start the application
# Update to latest image and redeploy
docker compose -f docker-compose.pi.yml pull
docker compose -f docker-compose.pi.yml up -d



Expand All @@ -206,29 +192,14 @@ docker compose -f docker-compose.pi.yml ps



## Updating the Application#### Step 1: Build on Windows

```powershell

When new versions are released:.\build-docker-windows.ps1
## Updating the Application

```
When new versions are released:

```bash

cd ~/BudgetExperimentThis will:

docker compose -f docker-compose.pi.yml pull- Run tests

docker compose -f docker-compose.pi.yml up -d- Build the Docker image for ARM64

```

#### Step 2: Deploy to Pi

That's it! The new image will be downloaded and deployed automatically.```powershell

.\deploy-to-pi.ps1 -PiHost raspberry-pi.local -PiUser pi
cd ~/BudgetExperiment
docker compose -f docker-compose.pi.yml pull
docker compose -f docker-compose.pi.yml up -d

## Troubleshooting```

Expand Down Expand Up @@ -358,14 +329,7 @@ docker stats

## Updating the Application

When you make code changes:

```powershell
# On Windows, just run the deployment again
.\deploy-to-pi.ps1 -PiHost raspberry-pi.local -PiUser pi
```

This will rebuild and redeploy automatically.
When you make code changes and push to main, the CI/CD pipeline builds new images. On the Pi, pull and restart using the commands above.

## Accessing the Application

Expand All @@ -390,11 +354,8 @@ Replace `raspberry-pi.local` with your Pi's IP address if hostname doesn't work.
└─────────────────┘ └──────────────────┘ └─────────────┘
```

## Files Created
## Files

- `build-docker-windows.ps1` - Builds ARM64 Docker image on Windows
- `deploy-to-pi.ps1` - Complete deployment script (build + transfer + deploy)
- `load-and-deploy.sh` - Runs on Pi to load and start containers
- `README.Docker.md` - Detailed Docker documentation
- `DEPLOY-QUICKSTART.md` - This file

Expand Down
Loading