docker-sentinel 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. docker_sentinel-0.1.0/LICENSE +21 -0
  2. docker_sentinel-0.1.0/PKG-INFO +141 -0
  3. docker_sentinel-0.1.0/README.md +113 -0
  4. docker_sentinel-0.1.0/docker_sentinel.egg-info/PKG-INFO +141 -0
  5. docker_sentinel-0.1.0/docker_sentinel.egg-info/SOURCES.txt +34 -0
  6. docker_sentinel-0.1.0/docker_sentinel.egg-info/dependency_links.txt +1 -0
  7. docker_sentinel-0.1.0/docker_sentinel.egg-info/entry_points.txt +2 -0
  8. docker_sentinel-0.1.0/docker_sentinel.egg-info/requires.txt +1 -0
  9. docker_sentinel-0.1.0/docker_sentinel.egg-info/top_level.txt +1 -0
  10. docker_sentinel-0.1.0/pyproject.toml +43 -0
  11. docker_sentinel-0.1.0/sentinel/__init__.py +6 -0
  12. docker_sentinel-0.1.0/sentinel/__main__.py +8 -0
  13. docker_sentinel-0.1.0/sentinel/automation.py +200 -0
  14. docker_sentinel-0.1.0/sentinel/bot.py +419 -0
  15. docker_sentinel-0.1.0/sentinel/changes.py +551 -0
  16. docker_sentinel-0.1.0/sentinel/cli.py +375 -0
  17. docker_sentinel-0.1.0/sentinel/collector.py +285 -0
  18. docker_sentinel-0.1.0/sentinel/demo.py +119 -0
  19. docker_sentinel-0.1.0/sentinel/mailer.py +58 -0
  20. docker_sentinel-0.1.0/sentinel/memory.py +179 -0
  21. docker_sentinel-0.1.0/sentinel/notifier.py +220 -0
  22. docker_sentinel-0.1.0/sentinel/playbooks/raise_memory.yml +23 -0
  23. docker_sentinel-0.1.0/sentinel/playbooks/restart.yml +20 -0
  24. docker_sentinel-0.1.0/sentinel/playbooks/rollback.yml +35 -0
  25. docker_sentinel-0.1.0/sentinel/recovery.py +499 -0
  26. docker_sentinel-0.1.0/sentinel/rules.py +219 -0
  27. docker_sentinel-0.1.0/sentinel/store.py +281 -0
  28. docker_sentinel-0.1.0/sentinel/subscribers.py +118 -0
  29. docker_sentinel-0.1.0/sentinel/ticket.py +196 -0
  30. docker_sentinel-0.1.0/sentinel/tracker.py +219 -0
  31. docker_sentinel-0.1.0/sentinel/users.py +283 -0
  32. docker_sentinel-0.1.0/sentinel/web.py +133 -0
  33. docker_sentinel-0.1.0/setup.cfg +4 -0
  34. docker_sentinel-0.1.0/tests/test_recovery.py +254 -0
  35. docker_sentinel-0.1.0/tests/test_subscribers.py +49 -0
  36. docker_sentinel-0.1.0/tests/test_users_bot.py +236 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jairam Hegde
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,141 @@
1
+ Metadata-Version: 2.4
2
+ Name: docker-sentinel
3
+ Version: 0.1.0
4
+ Summary: Lightweight local tool that detects, diagnoses and recovers failing Docker containers.
5
+ Author: Jairam Hegde
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/Jairamhegde/DockerSentinel
8
+ Project-URL: Repository, https://github.com/Jairamhegde/DockerSentinel
9
+ Project-URL: Issues, https://github.com/Jairamhegde/DockerSentinel/issues
10
+ Keywords: docker,containers,monitoring,diagnostics,recovery,ansible
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: System Administrators
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: System :: Monitoring
22
+ Classifier: Topic :: System :: Systems Administration
23
+ Requires-Python: >=3.9
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: docker>=7.0
27
+ Dynamic: license-file
28
+
29
+ # DockerSentinel
30
+
31
+ [![unit test](https://github.com/Jairamhegde/DockerSentinel/actions/workflows/tests.yml/badge.svg)](https://github.com/Jairamhegde/DockerSentinel/actions/workflows/tests.yml)
32
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
33
+
34
+ A lightweight tool that runs on your own machine and watches your Docker containers. When one fails, it tells you **what went wrong** and **what changed since it last worked**, recovers it with **Ansible**, and alerts you on **Telegram**.
35
+
36
+ > **Status: alpha.** Tested on Linux (Fedora). By default `sentinel watch` **changes containers** to recover them; use `--no-recover` to only diagnose and notify.
37
+
38
+ ## What it does
39
+
40
+ Docker only says `Exited (1) 3 seconds ago`. Sentinel answers the real question:
41
+
42
+ ```
43
+ ╭─ #5 CRASHED ─────────────────────────────────────────────── 02:03:50 ─╮
44
+ │ demo-app · exit 1 │
45
+ │ ✖ PROBLEM It worked at 02:03. Since then 1 setting changed: │
46
+ │ • Dockerfile step REMOVED: COPY config.txt . │
47
+ │ ✔ SOLUTION Add 'COPY config.txt .' back to your Dockerfile, rebuild. │
48
+ │ LAST LOGS Error: config.txt not found │
49
+ ╰────────────────────────────────────────────────────────────────────────╯
50
+ ```
51
+
52
+ 1. **Detects** failures: crashes, out-of-memory kills, failed starts, unhealthy checks, crash loops, memory leaks.
53
+ 2. **Diagnoses** them: explains how it failed and ranks what changed (env vars, ports, mounts, command, Dockerfile steps) since the last good run.
54
+ 3. **Recovers** (Ansible): restart, raise the memory limit, or roll back to the last good image. Cases that need a human are only reported.
55
+ 4. **Notifies** registered users on Telegram; each user picks alert types and containers, and can mute.
56
+
57
+ ## Install
58
+
59
+ **Requirements:** Python 3.9+, Docker running, and your user in the `docker` group (Linux: `sudo usermod -aG docker $USER`, then log in again). For automatic recovery also install Ansible and its Docker collection:
60
+
61
+ ```bash
62
+ sudo apt install ansible # or: sudo dnf install ansible
63
+ ansible-galaxy collection install community.docker
64
+ ```
65
+
66
+ **Install Sentinel:**
67
+
68
+ ```bash
69
+ pipx install docker-sentinel # or: pip install docker-sentinel
70
+ ```
71
+
72
+ **From source:**
73
+
74
+ ```bash
75
+ git clone https://github.com/Jairamhegde/DockerSentinel.git && cd DockerSentinel
76
+ python3 -m venv .venv && source .venv/bin/activate
77
+ pip install -e .
78
+ ```
79
+
80
+ ## Usage
81
+
82
+ ```bash
83
+ sentinel demo # 10-second demo with a fake app, no setup needed
84
+ sentinel watch # watch, diagnose, recover, notify (main mode)
85
+ sentinel watch --no-recover # diagnose and notify only; never touches containers
86
+ sentinel check # check all containers once
87
+ sentinel history -n 10 # last 10 saved tickets
88
+ ```
89
+
90
+ | Command | Purpose |
91
+ |---|---|
92
+ | `sentinel users add +91... --name N [--admin]` / `list` / `remove <phone>` | Manage who may receive Telegram alerts |
93
+ | `sentinel notify-test` | Check the Telegram setup and send a test message |
94
+ | `sentinel web` | Local sign-up page (http://localhost:8080) |
95
+
96
+ Tickets are stored in `~/.docker-sentinel/sentinel.db`.
97
+
98
+ ### Telegram alerts (optional)
99
+
100
+ 1. Create a bot with **@BotFather** and `export SENTINEL_TELEGRAM_TOKEN="123456:ABC..."`.
101
+ 2. Allow numbers: `sentinel users add +91 98765 43210 --name Jairam --admin`.
102
+ 3. Run `sentinel watch`. Each user opens the printed bot link, presses **Start**, shares their phone number, then uses `/alerts`, `/containers`, `/mute 2h`.
103
+
104
+ Without a token, alerts are printed in the terminal only.
105
+
106
+ ## Tech stack
107
+
108
+ Python 3.9+ (standard library plus the `docker` SDK) · Docker Engine API · Ansible (`community.docker`) · SQLite · Telegram Bot API · pytest and GitHub Actions for tests and releases.
109
+
110
+ ## Architecture
111
+
112
+ ```
113
+ Docker events + 5 s scan ──► collector.py gathers evidence (inspect, logs, image history)
114
+ │
115
+ tracker.py snapshots each run: "good" or "bad"
116
+ │
117
+ rules.py + changes.py HOW it failed + WHAT changed vs last good run
118
+ │
119
+ store.py (SQLite) + ticket.py saves and prints the ticket
120
+ │
121
+ recovery.py picks one fix from the root cause
122
+ │
123
+ automation.py ──► Ansible playbooks (restart / raise_memory / rollback)
124
+ │
125
+ notifier.py ──► Telegram (bot.py, users.py, memory.py)
126
+ ```
127
+
128
+ Sentinel is a normal Docker client: it doesn't sit between you and Docker, so Docker keeps working if Sentinel stops. Env var **values are never stored**, only SHA-256 fingerprints.
129
+
130
+ More detail (algorithm, recovery table, alerts, live tests): [docs/DETAILS.md](docs/DETAILS.md) · demo walkthrough: [docs/DEMO.md](docs/DEMO.md).
131
+
132
+ ## Development
133
+
134
+ ```bash
135
+ pip install -r requirements-dev.txt && pip install -e .
136
+ python -m pytest
137
+ ```
138
+
139
+ ## License
140
+
141
+ [MIT](LICENSE)
@@ -0,0 +1,113 @@
1
+ # DockerSentinel
2
+
3
+ [![unit test](https://github.com/Jairamhegde/DockerSentinel/actions/workflows/tests.yml/badge.svg)](https://github.com/Jairamhegde/DockerSentinel/actions/workflows/tests.yml)
4
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
5
+
6
+ A lightweight tool that runs on your own machine and watches your Docker containers. When one fails, it tells you **what went wrong** and **what changed since it last worked**, recovers it with **Ansible**, and alerts you on **Telegram**.
7
+
8
+ > **Status: alpha.** Tested on Linux (Fedora). By default `sentinel watch` **changes containers** to recover them; use `--no-recover` to only diagnose and notify.
9
+
10
+ ## What it does
11
+
12
+ Docker only says `Exited (1) 3 seconds ago`. Sentinel answers the real question:
13
+
14
+ ```
15
+ ╭─ #5 CRASHED ─────────────────────────────────────────────── 02:03:50 ─╮
16
+ │ demo-app · exit 1 │
17
+ │ ✖ PROBLEM It worked at 02:03. Since then 1 setting changed: │
18
+ │ • Dockerfile step REMOVED: COPY config.txt . │
19
+ │ ✔ SOLUTION Add 'COPY config.txt .' back to your Dockerfile, rebuild. │
20
+ │ LAST LOGS Error: config.txt not found │
21
+ ╰────────────────────────────────────────────────────────────────────────╯
22
+ ```
23
+
24
+ 1. **Detects** failures: crashes, out-of-memory kills, failed starts, unhealthy checks, crash loops, memory leaks.
25
+ 2. **Diagnoses** them: explains how it failed and ranks what changed (env vars, ports, mounts, command, Dockerfile steps) since the last good run.
26
+ 3. **Recovers** (Ansible): restart, raise the memory limit, or roll back to the last good image. Cases that need a human are only reported.
27
+ 4. **Notifies** registered users on Telegram; each user picks alert types and containers, and can mute.
28
+
29
+ ## Install
30
+
31
+ **Requirements:** Python 3.9+, Docker running, and your user in the `docker` group (Linux: `sudo usermod -aG docker $USER`, then log in again). For automatic recovery also install Ansible and its Docker collection:
32
+
33
+ ```bash
34
+ sudo apt install ansible # or: sudo dnf install ansible
35
+ ansible-galaxy collection install community.docker
36
+ ```
37
+
38
+ **Install Sentinel:**
39
+
40
+ ```bash
41
+ pipx install docker-sentinel # or: pip install docker-sentinel
42
+ ```
43
+
44
+ **From source:**
45
+
46
+ ```bash
47
+ git clone https://github.com/Jairamhegde/DockerSentinel.git && cd DockerSentinel
48
+ python3 -m venv .venv && source .venv/bin/activate
49
+ pip install -e .
50
+ ```
51
+
52
+ ## Usage
53
+
54
+ ```bash
55
+ sentinel demo # 10-second demo with a fake app, no setup needed
56
+ sentinel watch # watch, diagnose, recover, notify (main mode)
57
+ sentinel watch --no-recover # diagnose and notify only; never touches containers
58
+ sentinel check # check all containers once
59
+ sentinel history -n 10 # last 10 saved tickets
60
+ ```
61
+
62
+ | Command | Purpose |
63
+ |---|---|
64
+ | `sentinel users add +91... --name N [--admin]` / `list` / `remove <phone>` | Manage who may receive Telegram alerts |
65
+ | `sentinel notify-test` | Check the Telegram setup and send a test message |
66
+ | `sentinel web` | Local sign-up page (http://localhost:8080) |
67
+
68
+ Tickets are stored in `~/.docker-sentinel/sentinel.db`.
69
+
70
+ ### Telegram alerts (optional)
71
+
72
+ 1. Create a bot with **@BotFather** and `export SENTINEL_TELEGRAM_TOKEN="123456:ABC..."`.
73
+ 2. Allow numbers: `sentinel users add +91 98765 43210 --name Jairam --admin`.
74
+ 3. Run `sentinel watch`. Each user opens the printed bot link, presses **Start**, shares their phone number, then uses `/alerts`, `/containers`, `/mute 2h`.
75
+
76
+ Without a token, alerts are printed in the terminal only.
77
+
78
+ ## Tech stack
79
+
80
+ Python 3.9+ (standard library plus the `docker` SDK) · Docker Engine API · Ansible (`community.docker`) · SQLite · Telegram Bot API · pytest and GitHub Actions for tests and releases.
81
+
82
+ ## Architecture
83
+
84
+ ```
85
+ Docker events + 5 s scan ──► collector.py gathers evidence (inspect, logs, image history)
86
+ │
87
+ tracker.py snapshots each run: "good" or "bad"
88
+ │
89
+ rules.py + changes.py HOW it failed + WHAT changed vs last good run
90
+ │
91
+ store.py (SQLite) + ticket.py saves and prints the ticket
92
+ │
93
+ recovery.py picks one fix from the root cause
94
+ │
95
+ automation.py ──► Ansible playbooks (restart / raise_memory / rollback)
96
+ │
97
+ notifier.py ──► Telegram (bot.py, users.py, memory.py)
98
+ ```
99
+
100
+ Sentinel is a normal Docker client: it doesn't sit between you and Docker, so Docker keeps working if Sentinel stops. Env var **values are never stored**, only SHA-256 fingerprints.
101
+
102
+ More detail (algorithm, recovery table, alerts, live tests): [docs/DETAILS.md](docs/DETAILS.md) · demo walkthrough: [docs/DEMO.md](docs/DEMO.md).
103
+
104
+ ## Development
105
+
106
+ ```bash
107
+ pip install -r requirements-dev.txt && pip install -e .
108
+ python -m pytest
109
+ ```
110
+
111
+ ## License
112
+
113
+ [MIT](LICENSE)
@@ -0,0 +1,141 @@
1
+ Metadata-Version: 2.4
2
+ Name: docker-sentinel
3
+ Version: 0.1.0
4
+ Summary: Lightweight local tool that detects, diagnoses and recovers failing Docker containers.
5
+ Author: Jairam Hegde
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/Jairamhegde/DockerSentinel
8
+ Project-URL: Repository, https://github.com/Jairamhegde/DockerSentinel
9
+ Project-URL: Issues, https://github.com/Jairamhegde/DockerSentinel/issues
10
+ Keywords: docker,containers,monitoring,diagnostics,recovery,ansible
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: System Administrators
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: System :: Monitoring
22
+ Classifier: Topic :: System :: Systems Administration
23
+ Requires-Python: >=3.9
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: docker>=7.0
27
+ Dynamic: license-file
28
+
29
+ # DockerSentinel
30
+
31
+ [![unit test](https://github.com/Jairamhegde/DockerSentinel/actions/workflows/tests.yml/badge.svg)](https://github.com/Jairamhegde/DockerSentinel/actions/workflows/tests.yml)
32
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
33
+
34
+ A lightweight tool that runs on your own machine and watches your Docker containers. When one fails, it tells you **what went wrong** and **what changed since it last worked**, recovers it with **Ansible**, and alerts you on **Telegram**.
35
+
36
+ > **Status: alpha.** Tested on Linux (Fedora). By default `sentinel watch` **changes containers** to recover them; use `--no-recover` to only diagnose and notify.
37
+
38
+ ## What it does
39
+
40
+ Docker only says `Exited (1) 3 seconds ago`. Sentinel answers the real question:
41
+
42
+ ```
43
+ ╭─ #5 CRASHED ─────────────────────────────────────────────── 02:03:50 ─╮
44
+ │ demo-app · exit 1 │
45
+ │ ✖ PROBLEM It worked at 02:03. Since then 1 setting changed: │
46
+ │ • Dockerfile step REMOVED: COPY config.txt . │
47
+ │ ✔ SOLUTION Add 'COPY config.txt .' back to your Dockerfile, rebuild. │
48
+ │ LAST LOGS Error: config.txt not found │
49
+ ╰────────────────────────────────────────────────────────────────────────╯
50
+ ```
51
+
52
+ 1. **Detects** failures: crashes, out-of-memory kills, failed starts, unhealthy checks, crash loops, memory leaks.
53
+ 2. **Diagnoses** them: explains how it failed and ranks what changed (env vars, ports, mounts, command, Dockerfile steps) since the last good run.
54
+ 3. **Recovers** (Ansible): restart, raise the memory limit, or roll back to the last good image. Cases that need a human are only reported.
55
+ 4. **Notifies** registered users on Telegram; each user picks alert types and containers, and can mute.
56
+
57
+ ## Install
58
+
59
+ **Requirements:** Python 3.9+, Docker running, and your user in the `docker` group (Linux: `sudo usermod -aG docker $USER`, then log in again). For automatic recovery also install Ansible and its Docker collection:
60
+
61
+ ```bash
62
+ sudo apt install ansible # or: sudo dnf install ansible
63
+ ansible-galaxy collection install community.docker
64
+ ```
65
+
66
+ **Install Sentinel:**
67
+
68
+ ```bash
69
+ pipx install docker-sentinel # or: pip install docker-sentinel
70
+ ```
71
+
72
+ **From source:**
73
+
74
+ ```bash
75
+ git clone https://github.com/Jairamhegde/DockerSentinel.git && cd DockerSentinel
76
+ python3 -m venv .venv && source .venv/bin/activate
77
+ pip install -e .
78
+ ```
79
+
80
+ ## Usage
81
+
82
+ ```bash
83
+ sentinel demo # 10-second demo with a fake app, no setup needed
84
+ sentinel watch # watch, diagnose, recover, notify (main mode)
85
+ sentinel watch --no-recover # diagnose and notify only; never touches containers
86
+ sentinel check # check all containers once
87
+ sentinel history -n 10 # last 10 saved tickets
88
+ ```
89
+
90
+ | Command | Purpose |
91
+ |---|---|
92
+ | `sentinel users add +91... --name N [--admin]` / `list` / `remove <phone>` | Manage who may receive Telegram alerts |
93
+ | `sentinel notify-test` | Check the Telegram setup and send a test message |
94
+ | `sentinel web` | Local sign-up page (http://localhost:8080) |
95
+
96
+ Tickets are stored in `~/.docker-sentinel/sentinel.db`.
97
+
98
+ ### Telegram alerts (optional)
99
+
100
+ 1. Create a bot with **@BotFather** and `export SENTINEL_TELEGRAM_TOKEN="123456:ABC..."`.
101
+ 2. Allow numbers: `sentinel users add +91 98765 43210 --name Jairam --admin`.
102
+ 3. Run `sentinel watch`. Each user opens the printed bot link, presses **Start**, shares their phone number, then uses `/alerts`, `/containers`, `/mute 2h`.
103
+
104
+ Without a token, alerts are printed in the terminal only.
105
+
106
+ ## Tech stack
107
+
108
+ Python 3.9+ (standard library plus the `docker` SDK) · Docker Engine API · Ansible (`community.docker`) · SQLite · Telegram Bot API · pytest and GitHub Actions for tests and releases.
109
+
110
+ ## Architecture
111
+
112
+ ```
113
+ Docker events + 5 s scan ──► collector.py gathers evidence (inspect, logs, image history)
114
+ │
115
+ tracker.py snapshots each run: "good" or "bad"
116
+ │
117
+ rules.py + changes.py HOW it failed + WHAT changed vs last good run
118
+ │
119
+ store.py (SQLite) + ticket.py saves and prints the ticket
120
+ │
121
+ recovery.py picks one fix from the root cause
122
+ │
123
+ automation.py ──► Ansible playbooks (restart / raise_memory / rollback)
124
+ │
125
+ notifier.py ──► Telegram (bot.py, users.py, memory.py)
126
+ ```
127
+
128
+ Sentinel is a normal Docker client: it doesn't sit between you and Docker, so Docker keeps working if Sentinel stops. Env var **values are never stored**, only SHA-256 fingerprints.
129
+
130
+ More detail (algorithm, recovery table, alerts, live tests): [docs/DETAILS.md](docs/DETAILS.md) · demo walkthrough: [docs/DEMO.md](docs/DEMO.md).
131
+
132
+ ## Development
133
+
134
+ ```bash
135
+ pip install -r requirements-dev.txt && pip install -e .
136
+ python -m pytest
137
+ ```
138
+
139
+ ## License
140
+
141
+ [MIT](LICENSE)
@@ -0,0 +1,34 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ docker_sentinel.egg-info/PKG-INFO
5
+ docker_sentinel.egg-info/SOURCES.txt
6
+ docker_sentinel.egg-info/dependency_links.txt
7
+ docker_sentinel.egg-info/entry_points.txt
8
+ docker_sentinel.egg-info/requires.txt
9
+ docker_sentinel.egg-info/top_level.txt
10
+ sentinel/__init__.py
11
+ sentinel/__main__.py
12
+ sentinel/automation.py
13
+ sentinel/bot.py
14
+ sentinel/changes.py
15
+ sentinel/cli.py
16
+ sentinel/collector.py
17
+ sentinel/demo.py
18
+ sentinel/mailer.py
19
+ sentinel/memory.py
20
+ sentinel/notifier.py
21
+ sentinel/recovery.py
22
+ sentinel/rules.py
23
+ sentinel/store.py
24
+ sentinel/subscribers.py
25
+ sentinel/ticket.py
26
+ sentinel/tracker.py
27
+ sentinel/users.py
28
+ sentinel/web.py
29
+ sentinel/playbooks/raise_memory.yml
30
+ sentinel/playbooks/restart.yml
31
+ sentinel/playbooks/rollback.yml
32
+ tests/test_recovery.py
33
+ tests/test_subscribers.py
34
+ tests/test_users_bot.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ sentinel = sentinel.cli:main
@@ -0,0 +1 @@
1
+ docker>=7.0
@@ -0,0 +1,43 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "docker-sentinel"
7
+ version = "0.1.0"
8
+ description = "Lightweight local tool that detects, diagnoses and recovers failing Docker containers."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ authors = [{ name = "Jairam Hegde" }]
14
+ keywords = ["docker", "containers", "monitoring", "diagnostics", "recovery", "ansible"]
15
+ classifiers = [
16
+ "Development Status :: 3 - Alpha",
17
+ "Environment :: Console",
18
+ "Intended Audience :: Developers",
19
+ "Intended Audience :: System Administrators",
20
+ "Operating System :: POSIX :: Linux",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.9",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ "Topic :: System :: Monitoring",
27
+ "Topic :: System :: Systems Administration",
28
+ ]
29
+ dependencies = ["docker>=7.0"]
30
+
31
+ [project.urls]
32
+ Homepage = "https://github.com/Jairamhegde/DockerSentinel"
33
+ Repository = "https://github.com/Jairamhegde/DockerSentinel"
34
+ Issues = "https://github.com/Jairamhegde/DockerSentinel/issues"
35
+
36
+ [project.scripts]
37
+ sentinel = "sentinel.cli:main"
38
+
39
+ [tool.setuptools]
40
+ packages = ["sentinel"]
41
+
42
+ [tool.setuptools.package-data]
43
+ sentinel = ["playbooks/*.yml"]
@@ -0,0 +1,6 @@
1
+ """
2
+ DockerSentinel - a lightweight local tool that detects and diagnoses
3
+ failing Docker containers.
4
+ """
5
+
6
+ __version__ = "0.1.0"
@@ -0,0 +1,8 @@
1
+ """
2
+ Allows running the tool with: python -m sentinel
3
+ """
4
+
5
+ from sentinel.cli import main
6
+
7
+
8
+ main()