Files

64 lines
2.3 KiB
Markdown

# JdeScoping Host Local Docker Deploy
This folder contains a repeatable Docker Compose workflow for the `.NET 10` host (`JdeScoping.Host`) that serves the API + Blazor UI.
## Location
- Docker assets: `/Users/dohertj2/Desktop/JdeScopingTool/NEW/deploy/docker`
- Runtime config mount: `/Users/dohertj2/Desktop/JdeScopingTool/NEW/deploy/docker/runtime-config`
## Prerequisites
1. Docker Desktop (or Docker Engine + Compose plugin)
2. Local SQL container running on host port `1434` (for example `scopingtool-sqlserver`)
## Commands
Run commands from `/Users/dohertj2/Desktop/JdeScopingTool/NEW/deploy/docker`.
| Action | Command |
|---|---|
| Initial deploy (build + run) | `./deploy-host.sh deploy` |
| Deploy without rebuild | `./deploy-host.sh deploy --no-build` |
| Start container | `./deploy-host.sh start` |
| Stop container | `./deploy-host.sh stop` |
| Restart/redeploy (build) | `./deploy-host.sh restart` |
| Restart/redeploy (no build) | `./deploy-host.sh restart --no-build` |
| Force rebuild + recreate | `./deploy-host.sh rebuild` |
| Show status | `./deploy-host.sh status` |
| Stream logs | `./deploy-host.sh logs` |
| Destroy container/network | `./deploy-host.sh destroy` |
| Destroy container/network/volumes | `./deploy-host.sh destroy --volumes` |
## Runtime Config Layout
The container uses bind mounts so config updates do not require rebuilding the image.
- `runtime-config/appsettings.json` mapped to `/app/appsettings.json` (read-only)
- `runtime-config/appsettings.Development.json` mapped to `/app/appsettings.Development.json` (read-only)
- `runtime-config/Pipelines/pipeline.*.json` mapped to `/app/config/Pipelines` (read-only)
- `runtime-config/data/secrets.json` mapped to `/app/config/data/secrets.json`
- `runtime-config/data/secrets.key` mapped to `/app/config/data/secrets.key`
## Local DB Connectivity
Default local deployment expects SQL Server to be reachable from the container at:
- `host.docker.internal:1434`
`compose.yaml` also adds:
- `host.docker.internal:host-gateway`
If your SQL endpoint differs, update the relevant connection string values in SecureStore (`runtime-config/data/secrets.json`) before deploying.
## Health Check
After deploy:
```bash
curl http://localhost:5294/health
```
A valid response confirms the host is reachable (status may be `Healthy`, `Degraded`, or `Unhealthy` depending on dependency state).