Skip to content

Commit 17d22d3

Browse files
authored
Merge pull request #2 from just-omar/dev
Dev
2 parents 6f12ee9 + 962ef81 commit 17d22d3

4 files changed

Lines changed: 312 additions & 34 deletions

File tree

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Release & Publish
2+
3+
# Триггер: Запускается ТОЛЬКО когда вы ставите тег, начинающийся с 'v' (например, v1.0.0)
4+
on:
5+
push:
6+
tags:
7+
- 'v*'
8+
9+
permissions:
10+
contents: write # Разрешение на создание релиза в GitHub
11+
12+
jobs:
13+
build-and-push:
14+
name: Build Docker Image & GitHub Release
15+
runs-on: ubuntu-latest
16+
steps:
17+
# 1. Скачиваем код репозитория
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
# 2. Логинимся в Docker Hub
22+
- name: Login to Docker Hub
23+
uses: docker/login-action@v3
24+
with:
25+
username: ${{ secrets.DOCKER_USERNAME }}
26+
password: ${{ secrets.DOCKER_PASSWORD }}
27+
28+
# 3. Настраиваем QEMU и Buildx (для быстрой и мультиплатформенной сборки)
29+
- name: Set up QEMU
30+
uses: docker/setup-qemu-action@v3
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
34+
# 4. Собираем и пушим образ в Docker Hub
35+
- name: Build and push
36+
uses: docker/build-push-action@v5
37+
with:
38+
context: .
39+
push: true
40+
# Собираем сразу для обычных ПК (amd64) и новых Mac/Raspberry (arm64)
41+
platforms: linux/amd64,linux/arm64
42+
tags: |
43+
medzhidovomar/the-oops-bay:latest
44+
medzhidovomar/the-oops-bay:${{ github.ref_name }}
45+
46+
# 5. Создаем красивый релиз на странице GitHub
47+
- name: Create GitHub Release
48+
uses: softprops/action-gh-release@v2
49+
with:
50+
name: Release ${{ github.ref_name }}
51+
generate_release_notes: true # Автоматически создаст список изменений из коммитов
52+
make_latest: true
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Makefile

Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,79 @@
1+
# --- SYSTEM CHECK ---
2+
# Проверка: использовать 'docker compose' (V2) или 'docker-compose' (V1)
3+
DOCKER_COMPOSE := $(shell docker compose version > /dev/null 2>&1 && echo "docker compose" || echo "docker-compose")
4+
15
# --- VARIABLES ---
2-
DEV_COMPOSE = docker-compose -f docker-compose.dev.yml
3-
PROD_COMPOSE = docker-compose -f docker-compose.prod.yml
6+
DEV_COMPOSE = $(DOCKER_COMPOSE) -f docker-compose.dev.yml
7+
PROD_COMPOSE = $(DOCKER_COMPOSE) -f docker-compose.prod.yml
8+
9+
# --- HELP ---
10+
.PHONY: help
11+
help: ## Show this help message
12+
@echo "Usage: make [command]"
13+
@echo ""
14+
@echo "Development:"
15+
@grep -E '^[a-zA-Z_-]+-dev:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
16+
@echo ""
17+
@echo "Production:"
18+
@grep -E '^[a-zA-Z_-]+-prod:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
19+
@echo ""
20+
@echo "General:"
21+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
422

523
# --- DEVELOPMENT COMMANDS ---
624

7-
# Build and start development environment with hot reload
8-
dev-up:
25+
build-dev: ## Build development images
26+
$(DEV_COMPOSE) build
27+
28+
up-dev: ## Start development environment with hot reload
929
$(DEV_COMPOSE) up --build
1030

11-
# Stop development environment
12-
dev-down:
31+
down-dev: ## Stop development environment
1332
$(DEV_COMPOSE) down
1433

15-
# Restart development environment
16-
dev-restart:
34+
restart-dev: ## Restart development environment
1735
$(DEV_COMPOSE) restart
1836

19-
# Follow logs for development services
20-
dev-logs:
37+
logs-dev: ## Follow logs for development services
2138
$(DEV_COMPOSE) logs -f
2239

2340
# --- PRODUCTION COMMANDS ---
2441

25-
# Build and start production environment in detached mode
26-
prod-up:
42+
build-prod: ## Build production images
43+
$(PROD_COMPOSE) build
44+
45+
up-prod: ## Start production environment in detached mode
2746
$(PROD_COMPOSE) up --build -d
2847

29-
# Stop production environment and remove containers
30-
prod-down:
48+
down-prod: ## Stop production environment and remove containers
3149
$(PROD_COMPOSE) down
3250

33-
# Restart production services
34-
prod-restart:
51+
restart-prod: ## Restart production services
3552
$(PROD_COMPOSE) restart
3653

37-
# Follow logs for production services (very useful for debugging)
38-
prod-logs:
54+
logs-prod: ## Follow logs for production services
3955
$(PROD_COMPOSE) logs -f
4056

41-
# Check status of production containers
42-
prod-ps:
57+
ps-prod: ## Check status of production containers
4358
$(PROD_COMPOSE) ps
4459

4560
# --- UTILS & MAINTENANCE ---
4661

47-
# Stop all possible environments (dev and prod)
48-
stop-all:
62+
stop-all: ## Stop all environments (dev and prod)
4963
$(DEV_COMPOSE) down
5064
$(PROD_COMPOSE) down
5165

52-
# Full cleanup: remove containers, volumes, and all images
53-
clean:
66+
clean: ## Remove containers, volumes, and all images
5467
$(DEV_COMPOSE) down -v --rmi all
5568
$(PROD_COMPOSE) down -v --rmi all
5669

57-
# Backend specific: update go dependencies inside container
58-
# This helps fix the "missing go.sum entry" errors
59-
tidy:
70+
tidy: ## Run go mod tidy inside container
6071
$(DEV_COMPOSE) run --rm backend go mod tidy
6172

62-
# Frontend specific: install npm packages inside container
63-
install-deps:
73+
install-deps: ## Install npm packages inside container
6474
$(DEV_COMPOSE) run --rm frontend npm install
6575

66-
# Show current system resource usage by containers
67-
stats:
76+
stats: ## Show current system resource usage
6877
docker stats
6978

70-
# Default action when just running 'make'
71-
.DEFAULT_GOAL := dev-up
79+
.DEFAULT_GOAL := help

README.md

Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
2+
# 🐳 The Oops Bay
3+
4+
![License](https://img.shields.io/badge/license-AGPL--3.0-blue.svg) ![Go](https://img.shields.io/badge/backend-Go_%2B_Fiber-00ADD8.svg) ![React](https://img.shields.io/badge/frontend-React_%2B_Vite-61DAFB.svg) ![Docker](https://img.shields.io/badge/docker-managed-2496ED.svg)
5+
6+
**The Oops Bay** is a fast, elegant, and **extremely simple** dashboard for managing Docker containers 🧘‍♂️
7+
8+
No clutter. No cognitive overload. No enterprise bloat.
9+
**Oops Bay** is built for people who want to *understand what’s going on at a glance* — not fight with the UI.
10+
11+
---
12+
13+
## 🚀 Quick Start (Up and Running in 1 Minute)
14+
15+
We respect your time ⏱️ — setup is right here at the top.
16+
17+
### Option 1: Docker CLI
18+
19+
```bash
20+
docker run -d \
21+
--name the-oops-bay \
22+
--restart unless-stopped \
23+
-p 3000:3000 \
24+
-v /var/run/docker.sock:/var/run/docker.sock \
25+
-v ./oops-data:/app/data \
26+
medzhidovomar/the-oops-bay
27+
````
28+
For localhost-only, replace with: 127.0.0.1:3000:3000
29+
30+
Open your browser at:
31+
👉 **[http://localhost:3000](http://localhost:3000)** or your server IP on LAN.
32+
33+
---
34+
35+
### Option 2: Docker Compose
36+
37+
Create `docker-compose.yml`:
38+
39+
```yaml
40+
services:
41+
the-oops-bay:
42+
image: medzhidovomar/the-oops-bay:latest
43+
container_name: the-oops-bay
44+
restart: unless-stopped
45+
ports:
46+
- "3000:3000" # Default: open to all interfaces
47+
# - "127.0.0.1:3000:3000" # Optional: bind to localhost only for security
48+
volumes:
49+
- /var/run/docker.sock:/var/run/docker.sock # Docker API access
50+
- ./oops-data:/app/data # Persistent storage
51+
52+
```
53+
54+
Run it:
55+
56+
```bash
57+
docker-compose up -d
58+
```
59+
60+
> **Note:** Access to `/var/run/docker.sock` is required to manage containers and collect stats.
61+
62+
---
63+
64+
## ⚠️ Security & Networking Considerations
65+
66+
Exposing **The Oops Bay** dashboard to the internet without authentication is **dangerous**.
67+
Here’s how to do it safely.
68+
69+
### 🔒 Localhost-only binding (Recommended)
70+
71+
```yaml
72+
ports:
73+
- "127.0.0.1:3000:3000"
74+
```
75+
76+
This ensures the dashboard is **not visible externally**.
77+
78+
### 🌐 VPS / Remote Servers
79+
80+
* **SSH Tunneling (Recommended)**
81+
82+
```bash
83+
ssh -L 3000:localhost:3000 user@your-vps-ip
84+
```
85+
86+
Then open: [http://localhost:3000](http://localhost:3000)
87+
88+
* **VS Code Remote – SSH**
89+
Ports may be automatically forwarded.
90+
91+
### 🏠 HomeLab / LAN Access
92+
93+
* Use default `3000:3000` binding
94+
* Access via server local IP: `http://192.168.1.50:3000`
95+
* Ensure firewall allows traffic on port `3000`
96+
97+
### 🧱 Using a Reverse Proxy (Caddy / Nginx / Traefik)
98+
99+
Even without auth, a reverse proxy can:
100+
101+
* Terminate HTTPS (TLS)
102+
* Restrict access by IP or VPN
103+
* Add optional basic auth
104+
* Hide dashboard from direct internet exposure
105+
106+
Example **Caddyfile**:
107+
108+
```caddy
109+
theoopsbay.example.com {
110+
reverse_proxy localhost:3000
111+
112+
# Optional: basic auth
113+
# basicauth {
114+
# admin JDJhJDE0JHNhbXBsZXBhc3N3b3Jk
115+
# }
116+
}
117+
```
118+
119+
> ⚠️ Reverse proxy helps **isolate, encrypt, and control access**,
120+
> but it **does NOT make an unauthenticated dashboard completely secure**.
121+
122+
---
123+
124+
## ✨ Why The Oops Bay?
125+
126+
> **Simplicity first. Clarity over features. UX over checklists.** 🎯
127+
128+
* **🧠 Radically Simple UI**
129+
Low cognitive load, clean layout, everything visible at a glance.
130+
131+
* **⚡ Incredible Performance**
132+
Go + Fiber backend, minimal CPU & RAM usage.
133+
134+
* **📊 Historical Metrics**
135+
CPU & RAM usage history, beautiful charts, no paid tiers.
136+
137+
* **🎨 Modern UX/UI**
138+
React + Vite + Tailwind + Framer Motion, fully responsive.
139+
140+
* **🛠 Effortless Customization**
141+
Rename containers, custom icons, group by project.
142+
143+
---
144+
145+
## 🆚 Comparison
146+
147+
| Feature | The Oops Bay 🌊 | Portainer | Dozzle | Standard CLI |
148+
| -------------------- | --------------- | ------------------- | ------------- | ------------ |
149+
| UI Simplicity | ⭐⭐⭐⭐⭐ (Minimal) | ⭐⭐ (Bloated) | ⭐⭐⭐ ||
150+
| Cognitive Load | Very Low 🧘‍♂️ | High 🧠💥 | Medium | High |
151+
| Resource Usage | ⭐⭐⭐⭐⭐ (Low) | ⭐⭐ (High) | ⭐⭐⭐⭐ (Low) | N/A |
152+
| Historical Charts || ❌ (Business only) |||
153+
| Control (Start/Stop) ||| ❌ (Logs only) ||
154+
| UI / Aesthetics | Modern (2025+) | Enterprise (Legacy) | Simple | Console |
155+
| Speed | Go + Fiber 🚀 | Go (Slow API) | Go | Instant |
156+
157+
---
158+
159+
## 🛠 Tech Stack
160+
161+
**Backend:** Go 1.21+, Fiber, GORM (SQLite), Docker SDK
162+
**Frontend:** React 18, Vite, TailwindCSS, Lucide Icons
163+
**Charts:** Recharts
164+
165+
---
166+
167+
## 🤝 Contribution
168+
169+
Pull Requests welcome ❤️
170+
171+
### Prerequisites
172+
173+
* Go 1.21+
174+
* Node.js 18+
175+
* Docker (running locally)
176+
177+
### Run Locally
178+
179+
```bash
180+
git clone https://github.com/justomar/the-oops-bay.git
181+
cd the-oops-bay
182+
```
183+
184+
Frontend:
185+
186+
```bash
187+
cd frontend
188+
npm install
189+
npm run dev
190+
```
191+
192+
Backend:
193+
194+
```bash
195+
go mod download
196+
go run .
197+
```
198+
199+
API available at `http://localhost:3000/api`.
200+
201+
---
202+
203+
## 📝 License
204+
205+
**GNU AGPL v3.0** 📜
206+
207+
You can use, modify, and distribute —
208+
**but if you run it as a service, you must share your changes.**
209+
210+
---
211+
212+
<p align="center">
213+
Made with ❤️ and a strong dislike for bloated UIs<br/>
214+
for the Docker Community 🐳
215+
</p>
216+

docker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func InitDocker() error {
2727
var err error
2828
dockerClient, err = client.NewClientWithOpts(
2929
client.FromEnv,
30-
client.WithVersion("1.41"),
30+
client.WithAPIVersionNegotiation(),
3131
)
3232
if err != nil {
3333
return err

0 commit comments

Comments
 (0)