Windows Docker Operations¶
Separate deployment type from Native Windows Service. Scripts: scripts/windows/docker.
Current shape: source-build installer. It runs docker build. It is not the Linux offline docker load package.
GitHub Release zip: iqv-integration-api-<version>-windows-docker-amd64.zip is a checksummed source snapshot plus the existing installer. It does not include .git. After extract, release-package mode reads version / commit from package-root manifest.json, so install does not require Git, git init, or a repository clone. A normal git checkout (.git present) keeps the previous git-based provenance behavior.
Prerequisite: Docker Desktop with Linux containers. The scripts do not install Docker.
Official package entrypoint after extract: .\scripts\install.ps1 (forwards to scripts\windows\docker\install.ps1).
Install overview: Docker Installation.
Inspect¶
powershell
docker ps
docker inspect <container>
docker compose ps
powershell.exe -ExecutionPolicy Bypass -File .\scripts\windows\docker\status.ps1
Compose project name: iqv-integration-api. Restart policy: unless-stopped.
Logs¶
Application slog is container stdout/stderr (Docker json-file, 10m × 5).
powershell
docker logs <container>
docker logs -f <container>
docker compose logs -f
Do not expect a Windows file under C:\IQVizyon\... for container application logs.
Start / stop / restart¶
powershell
docker compose start
docker compose stop
docker compose restart
docker compose up -d
docker compose down
Prefer scripts/windows/docker\update.ps1 / uninstall.ps1 over ad-hoc compose for production-like lab operations.
External MongoDB and host.docker.internal¶
Windows Docker Desktop can reach host MongoDB at host.docker.internal. Compose files add extra_hosts: host.docker.internal:host-gateway.
text
MONGODB_URI=mongodb://host.docker.internal:27017
Loopback (127.0.0.1 / localhost) inside the container is the container itself and is rejected for external Mongo mode.
Port mapping¶
| Concept | Env / flag | Meaning |
|---|---|---|
| HostPort | IQV_HOST_PORT / -HostPort |
Published on the Windows host |
| ContainerPort | HTTP_PORT / -ContainerPort |
Listen port inside the container |
Compose maps ${IQV_HOST_PORT}:${HTTP_PORT}. Only HostPort is preflight-checked (exit 15). Native API on 4242 and Docker HostPort 4243 can coexist.
Health¶
Probe HostPort on the Windows host:
powershell
Invoke-RestMethod http://127.0.0.1:<HostPort>/health/live
Invoke-RestMethod http://127.0.0.1:<HostPort>/health/ready
Container healthcheck uses ContainerPort on 127.0.0.1 inside the container.
Update, NO-OP, ForceRedeploy, rollback¶
Decision is commit/image based (source-tree). Same deployed commit ⇒ NO-OP unless -ForceRedeploy.
Before mutating the runtime image, update tags an immutable snapshot iqv-integration-api:rollback-<short-id>-<timestamp>. Failed health restores that snapshot. Database rollback is not performed. Successful rollback still returns a non-zero exit code.
Lab-only: -TestFailAt AfterComposeUp.
Image cleanup safety¶
Uninstall may remove project images only with an explicit -RemoveImages. Scripts must not run docker system prune -a. Volumes are removed only with -RemoveVolumes -Force.
Reboot¶
restart: unless-stopped brings the API container back after Docker Desktop starts. Confirm Docker Desktop itself is set to start after login/boot.
Uninstall¶
powershell
powershell.exe -ExecutionPolicy Bypass -File .\scripts\windows\docker\uninstall.ps1
See Uninstall.