Skip to content

Commit fcd3ccb

Browse files
committed
feat(docs): add teardown instructions for services and cleanup in README.md
1 parent 530ab1f commit fcd3ccb

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,29 @@ After `rebuild.sh` completes, two manual steps remain: **Phase 7** (Keycloak rea
5050

5151
The sections below describe each phase individually. Use these if you need to apply a single phase in isolation, debug a failure, or understand what the script does.
5252

53+
### Tear down everything (optional)
54+
cd services/agent && tofu destroy -auto-approve && cd ../..
55+
cd services/webserver && tofu destroy -auto-approve && cd ../..
56+
cd services/keycloak && tofu destroy -auto-approve && cd ../..
57+
cd services/postgres && tofu destroy -auto-approve && cd ../..
58+
cd vault-config && tofu destroy -auto-approve && cd ..
59+
cd vault && tofu destroy -auto-approve && cd ..
60+
podman unshare rm -rf /opt/armory/vault /opt/armory/keycloak /opt/armory/webserver /opt/armory/postgres /opt/armory/agent 2>/dev/null || rm -rf /opt/armory/vault /opt/armory/keycloak /opt/armory/webserver /opt/armory/postgres /opt/armory/agent
61+
62+
# If containers aren't being stopped and removed
63+
podman ps -aq | xargs -r podman stop
64+
podman ps -aq | xargs -r podman rm
65+
66+
# Remove podman volumes
67+
podman volume ls -q | xargs -r podman volume rm
68+
69+
# Remove podman networks
70+
podman network ls --format '{{.Name}}' | grep armory | xargs -r podman network rm
71+
72+
# Clean up stale tfstate files
73+
find . -name 'terraform.tfstate*' -delete
74+
75+
5376
### 0. One-time host prerequisite
5477

5578
```bash

0 commit comments

Comments
 (0)