Skip to content

Commit 2e55362

Browse files
authored
Remove docker (#20)
* chore(docker): remove docker + cleanup docs * fix(server): remove correct websockets * ver 0.5.1
1 parent a82d553 commit 2e55362

File tree

14 files changed

+17
-291
lines changed

14 files changed

+17
-291
lines changed

.github/workflows/docker-publish.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,6 @@ dist/
6767
build/
6868
*.egg-info/
6969

70-
# Docker
71-
.docker/
72-
docker-compose.override.yml
73-
*.env
74-
!example.env
75-
7670
# Testing
7771
.coverage
7872
htmlcov/

Dockerfile

Lines changed: 0 additions & 60 deletions
This file was deleted.

README.md

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A cross-platform desktop notification system for Bluesky. Monitor and receive notifications from your favorite Bluesky accounts.
44

5-
[![Version](https://img.shields.io/badge/version-0.4.2-blue.svg)](https://github.com/jerdog/bluesky-notify)
5+
[![Version](https://img.shields.io/badge/version-0.5.1-blue.svg)](https://github.com/jerdog/bluesky-notify)
66
[![Python](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
77
[![Flask](https://img.shields.io/badge/Flask-3.1.0-blue)](https://pypi.org/project/Flask/)
88
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
@@ -12,17 +12,14 @@ https://pypi.org/project/bluesky-notify/
1212
## Features
1313

1414
- Monitor multiple Bluesky accounts for new posts
15-
- Real-time browser notifications in Docker environment
1615
- Desktop notifications support across platforms (macOS, Linux, Windows)
1716
- Daemon mode for continuous monitoring
1817
- Web interface for easy account management
19-
- Email notifications support (requires Mailgun configuration)
2018
- XDG-compliant configuration storage
2119
- SQLite database for reliable post tracking
2220
- Cross-platform compatibility
2321
- Consistent CLI interface with clear version and configuration information
2422
- Comprehensive logging system with rotation and separate error logs
25-
- WebSocket support for real-time updates in Docker environment
2623

2724
## Installation
2825

@@ -41,7 +38,7 @@ bluesky-notify --version
4138

4239
Example output:
4340
```
44-
Bluesky Notify v0.4.1
41+
Bluesky Notify v0.5.1
4542
Config: /Users/username/.local/share/bluesky-notify
4643

4744
A cross-platform desktop notification system for Bluesky. Monitor and receive notifications from your favorite Bluesky accounts.
@@ -73,7 +70,7 @@ The application uses the XDG Base Directory Specification for storing its data:
7370
- Configuration: `~/.config/bluesky-notify/`
7471
- Data: `~/.local/share/bluesky-notify/`
7572
- Cache: `~/.cache/bluesky-notify/`
76-
- Logs:
73+
- Logs:
7774
- macOS: `~/Library/Logs/bluesky-notify/`
7875
- Linux: `~/.local/share/bluesky-notify/logs/`
7976
@@ -85,17 +82,6 @@ The web interface runs on port 3000 by default. On macOS, port 5000 is avoided a
8582
bluesky-notify settings --port NUMBER
8683
```
8784

88-
### Email Notifications (Optional)
89-
90-
To enable email notifications, set the following environment variables:
91-
92-
```bash
93-
export MAILGUN_API_KEY='your-api-key'
94-
export MAILGUN_DOMAIN='your-domain'
95-
export MAILGUN_FROM_EMAIL='notifications@yourdomain.com'
96-
export MAILGUN_TO_EMAIL='your-email@example.com'
97-
```
98-
9985
## Usage
10086

10187
### Starting the Service
@@ -127,7 +113,6 @@ Note: The handle should be provided without the '@' symbol.
127113

128114
Options:
129115
- `--desktop/--no-desktop`: Enable/disable desktop notifications (default: enabled)
130-
- `--email/--no-email`: Enable/disable email notifications (default: disabled)
131116

132117
### Listing Monitored Accounts
133118

@@ -149,18 +134,9 @@ bluesky-notify remove username.bsky.social
149134

150135
Update notification preferences:
151136
```bash
152-
bluesky-notify update username.bsky.social --desktop/--no-desktop --email/--no-email
137+
bluesky-notify update username.bsky.social --desktop/--no-desktop
153138
```
154139

155-
## Docker Support
156-
157-
When running in Docker, the application supports browser notifications through WebSocket connections. The web interface will automatically detect the Docker environment and enable real-time notifications.
158-
159-
### Environment Variables
160-
161-
- `DOCKER_CONTAINER`: Set to 'true' to enable Docker-specific features
162-
- `PORT`: Override the default port (default: 5001 in Docker)
163-
164140
## Logging
165141

166142
The application uses a comprehensive logging system:
@@ -222,6 +198,9 @@ If you encounter any issues or have questions, please file an issue on the GitHu
222198

223199
## Version History
224200

201+
- 0.5.1: Remove docker functionality
202+
- 0.5.0: Cleanup codebase, remove old functionality
203+
- 0.4.4: Fix erratic notification issues
225204
- 0.4.2: Enhance monitoring + logging
226205
- 0.4.1: Validate Docker container image builds correctly, make CLI co-exist
227206
- 0.4.0: Add web interface to daemon + terminal mode

docker-compose.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "bluesky-notify"
7-
version = "0.5.0"
7+
version = "0.5.1"
88
authors = [
99
{ name = "Jeremy Meiss", email = "jeremy.meiss@gmail.com" },
1010
]

run.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ def start_notifier_thread(flask_app):
3434
"""Start the notification service in a new event loop."""
3535
loop = asyncio.new_event_loop()
3636
asyncio.set_event_loop(loop)
37-
37+
3838
# Create app context
3939
with flask_app.app_context():
4040
loop.run_until_complete(run_notifier(flask_app))
41-
41+
4242
loop.close()
4343

4444
if __name__ == "__main__":
@@ -48,20 +48,18 @@ def start_notifier_thread(flask_app):
4848
settings = Settings()
4949
current_settings = settings.get_settings()
5050
port = current_settings.get('port', 5001)
51-
51+
5252
logger.info("Starting Bluesky Notification Tracker...")
53-
is_container = os.environ.get('DOCKER_CONTAINER', 'false').lower() == 'true'
54-
53+
5554
# Start the notification service in a separate thread
5655
notifier_thread = threading.Thread(target=start_notifier_thread, args=(app,), daemon=True)
5756
notifier_thread.start()
5857
logger.info("Notification service started in background")
59-
58+
6059
# Start the web server
6160
run_server(
62-
host="0.0.0.0" if is_container else "127.0.0.1",
63-
port=port,
64-
debug=not is_container # Disable debug mode in container
61+
host="127.0.0.1",
62+
port=port
6563
)
6664
except Exception as e:
6765
logger.error(f"Application failed to start: {e}")

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
setup(
66
name="bluesky-notify",
7-
version="0.5.0",
7+
version="0.5.1",
88
description="Bluesky Notification Manager - Track and receive notifications from Bluesky accounts",
99
author="Jeremy Meiss",
1010
author_email="jeremy.meiss@gmail.com",

src/bluesky_notify/api/routes.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -183,20 +183,10 @@ def index():
183183
"""Serve the main page."""
184184
return render_template('index.html')
185185

186-
@app.route('/health')
187-
def health_check():
188-
"""Health check endpoint for Docker container."""
189-
return jsonify({
190-
'status': 'healthy',
191-
'timestamp': datetime.now().isoformat()
192-
}), 200
193-
194186
# Register blueprints
195187
app.register_blueprint(bp, url_prefix='/api')
196188

197189
if __name__ == '__main__':
198-
# Use port 3001 for local development, 5001 for Docker
199-
is_docker = os.path.exists('/.dockerenv')
200-
default_port = 5001 if is_docker else 3001
190+
default_port = 5001
201191
port = int(os.environ.get('PORT', default_port))
202192
app.run(host='0.0.0.0', port=port, debug=False)

src/bluesky_notify/api/server.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -151,36 +151,6 @@ def broadcast_notification(title, message, url):
151151
if not has_websocket:
152152
return
153153

154-
notification = {
155-
'type': 'notification',
156-
'title': title,
157-
'message': message,
158-
'url': url
159-
}
160-
with ws_lock:
161-
disconnected = set()
162-
for client in ws_clients:
163-
try:
164-
client.send(json.dumps(notification))
165-
except Exception:
166-
disconnected.add(client)
167-
# Clean up disconnected clients
168-
for client in disconnected:
169-
ws_clients.remove(client)
170-
171-
if has_websocket:
172-
@sock.route('/ws')
173-
def ws_handler(ws):
174-
"""Handle WebSocket connections for real-time notifications."""
175-
with ws_lock:
176-
ws_clients.add(ws)
177-
try:
178-
while True:
179-
# Keep connection alive and handle disconnection
180-
ws.receive()
181-
except Exception:
182-
with ws_lock:
183-
ws_clients.remove(ws)
184154

185155
@app.route('/shutdown', methods=['GET'])
186156
def shutdown():

0 commit comments

Comments
 (0)