docker-windows/compose/server/win2012.yml
Michel Abboud 23cc434703 feat: Add configurable restart policy, default to on-failure
- Changed restart policy from unless-stopped to on-failure
  so Windows shutdown stops the container instead of restarting
- Added RESTART_POLICY env variable to .env.modern and .env.legacy
- Compose files use ${RESTART_POLICY:-on-failure} for flexibility
- Updated WINCTL_GUIDE.md with restart policy documentation
- Updated readme.md with RESTART_POLICY setting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 00:46:11 +00:00

20 lines
420 B
YAML

services:
win2012:
image: dockurr/windows
container_name: win2012
env_file: ../../.env.legacy
environment:
VERSION: "2012"
devices:
- /dev/kvm
- /dev/net/tun
cap_add:
- NET_ADMIN
ports:
- 8112:8006
- 3212:3389/tcp
- 3212:3389/udp
volumes:
- ../../data/win2012:/storage
restart: ${RESTART_POLICY:-on-failure}
stop_grace_period: 2m