docs(README): Clarify deployment instructions and update resource requirements
- Change wording from "your laptop" to "your computer" for consistency. - Update RAM usage information for Gordon from <50MB to <15MB. - Reorganize runtime auto-detection section to prioritize Podman rootless socket. - Rename "Custom Ports" section to "Port binding" and clarify port exposure requirements in Dockerfile.
- commit
- ebc9afbb8177aaf33b5e648adf02abfa9930ce49
- author
- bamen · · 2025-06-07 15:02 UTC
- parent
- a5982eb
- signature
- unsigned
2 files · +16 -11
M README.md +11 -8
| @@ -346,7 +346,7 @@ A: On YOUR machine. If it runs locally, it'll run in production. No mysterious b | |||
| 346 | 346 | A: Just edit gordon.toml to point to a previous version. Rollback takes seconds, not minutes. | |
| 347 | 347 | ||
| 348 | 348 | **Q: Do I need CI/CD?** | |
| 349 | - | A: Nope! Your laptop is the CI/CD. Build, test locally, push when ready. Keep it simple. | |
| 349 | + | A: Nope! Your computer is the CI/CD. Build, test locally, push when ready. Keep it stupid simple. | |
| 350 | 350 | ||
| 351 | 351 | **Q: Do I need Cloudflare?** | |
| 352 | 352 | A: Yes for SSL certificates. Gordon doesn't handle Let's Encrypt yet, so Cloudflare provides the SSL termination and DDoS protection. | |
| @@ -355,7 +355,7 @@ A: Yes for SSL certificates. Gordon doesn't handle Let's Encrypt yet, so Cloudfl | |||
| 355 | 355 | A: You can in theory, but exposing databases on the internet is risky. Database/app isolation is coming soon for safer database deployments. | |
| 356 | 356 | ||
| 357 | 357 | **Q: Resource requirements?** | |
| 358 | - | A: Runs comfortably on 1GB RAM VPS. Gordon itself uses <50MB. | |
| 358 | + | A: Runs comfortably on 1GB RAM VPS. Gordon itself uses <15MB of RAM. | |
| 359 | 359 | ||
| 360 | 360 | **Q: What about secrets?** | |
| 361 | 361 | A: Use environment variables in your container or Docker secrets. Gordon doesn't interfere. | |
| @@ -417,13 +417,16 @@ gordon start | |||
| 417 | 417 | ### Runtime Auto-Detection | |
| 418 | 418 | Gordon automatically detects available container runtimes in this order: | |
| 419 | 419 | 1. **Docker** (`/var/run/docker.sock`) | |
| 420 | - | 2. **Podman root** (`/run/podman/podman.sock`) | |
| 421 | - | 3. **Podman rootless** (`$XDG_RUNTIME_DIR/podman/podman.sock`) | |
| 420 | + | 2. **Podman rootless** (`$XDG_RUNTIME_DIR/podman/podman.sock`) | |
| 421 | + | 3. **Podman root** (`/run/podman/podman.sock`) | |
| 422 | 422 | ||
| 423 | - | ### Custom Ports | |
| 424 | - | ```toml | |
| 425 | - | # Gordon auto-detects ports: 80, 8080, 3000 | |
| 426 | - | # Or use EXPOSE in Dockerfile | |
| 423 | + | ### Port binding | |
| 424 | + | Gordon requires your Dockerfile to explicitly expose ports using the `EXPOSE` instruction. When multiple ports are exposed, Gordon will use the first exposed port for HTTP traffic. | |
| 425 | + | ||
| 426 | + | Example Dockerfile: | |
| 427 | + | ``` | |
| 428 | + | ENTRYPOINT ["/myapp"] | |
| 429 | + | EXPOSE 8080 | |
| 427 | 430 | ``` | |
| 428 | 431 | ||
| 429 | 432 | ### Registry Operations | |
| @@ -346,7 +346,7 @@ A: On YOUR machine. If it runs locally, it'll run in production. No mysterious b | |||||
| 346 | A: Just edit gordon.toml to point to a previous version. Rollback takes seconds, not minutes. | 346 | A: Just edit gordon.toml to point to a previous version. Rollback takes seconds, not minutes. | ||
| 347 | 347 | ||||
| 348 | **Q: Do I need CI/CD?** | 348 | **Q: Do I need CI/CD?** | ||
| 349 | - | A: Nope! Your laptop is the CI/CD. Build, test locally, push when ready. Keep it simple. | 349 | + | A: Nope! Your computer is the CI/CD. Build, test locally, push when ready. Keep it stupid simple. |
| 350 | 350 | ||||
| 351 | **Q: Do I need Cloudflare?** | 351 | **Q: Do I need Cloudflare?** | ||
| 352 | A: Yes for SSL certificates. Gordon doesn't handle Let's Encrypt yet, so Cloudflare provides the SSL termination and DDoS protection. | 352 | A: Yes for SSL certificates. Gordon doesn't handle Let's Encrypt yet, so Cloudflare provides the SSL termination and DDoS protection. | ||
| @@ -355,7 +355,7 @@ A: Yes for SSL certificates. Gordon doesn't handle Let's Encrypt yet, so Cloudfl | |||||
| 355 | A: You can in theory, but exposing databases on the internet is risky. Database/app isolation is coming soon for safer database deployments. | 355 | A: You can in theory, but exposing databases on the internet is risky. Database/app isolation is coming soon for safer database deployments. | ||
| 356 | 356 | ||||
| 357 | **Q: Resource requirements?** | 357 | **Q: Resource requirements?** | ||
| 358 | - | A: Runs comfortably on 1GB RAM VPS. Gordon itself uses <50MB. | 358 | + | A: Runs comfortably on 1GB RAM VPS. Gordon itself uses <15MB of RAM. |
| 359 | 359 | ||||
| 360 | **Q: What about secrets?** | 360 | **Q: What about secrets?** | ||
| 361 | A: Use environment variables in your container or Docker secrets. Gordon doesn't interfere. | 361 | A: Use environment variables in your container or Docker secrets. Gordon doesn't interfere. | ||
| @@ -417,13 +417,16 @@ gordon start | |||||
| 417 | ### Runtime Auto-Detection | 417 | ### Runtime Auto-Detection | ||
| 418 | Gordon automatically detects available container runtimes in this order: | 418 | Gordon automatically detects available container runtimes in this order: | ||
| 419 | 1. **Docker** (`/var/run/docker.sock`) | 419 | 1. **Docker** (`/var/run/docker.sock`) | ||
| 420 | - | 2. **Podman root** (`/run/podman/podman.sock`) | 420 | + | 2. **Podman rootless** (`$XDG_RUNTIME_DIR/podman/podman.sock`) |
| 421 | - | 3. **Podman rootless** (`$XDG_RUNTIME_DIR/podman/podman.sock`) | 421 | + | 3. **Podman root** (`/run/podman/podman.sock`) |
| 422 | 422 | ||||
| 423 | - | ### Custom Ports | 423 | + | ### Port binding |
| 424 | - | ```toml | 424 | + | Gordon requires your Dockerfile to explicitly expose ports using the `EXPOSE` instruction. When multiple ports are exposed, Gordon will use the first exposed port for HTTP traffic. |
| 425 | - | # Gordon auto-detects ports: 80, 8080, 3000 | 425 | + | |
| 426 | - | # Or use EXPOSE in Dockerfile | 426 | + | Example Dockerfile: |
| 427 | + | ``` | |||
| 428 | + | ENTRYPOINT ["/myapp"] | |||
| 429 | + | EXPOSE 8080 | |||
| 427 | ``` | 430 | ``` | ||
| 428 | 431 | ||||
| 429 | ### Registry Operations | 432 | ### Registry Operations | ||
M internal/container/factory.go +5 -3
| @@ -194,15 +194,17 @@ func detectRuntimeType(socketPath string) RuntimeType { | |||
| 194 | 194 | // getDefaultSocketPaths returns the default socket paths to try | |
| 195 | 195 | func getDefaultSocketPaths() []string { | |
| 196 | 196 | paths := []string{ | |
| 197 | - | "unix:///var/run/docker.sock", // Docker | |
| 198 | - | "unix:///run/podman/podman.sock", // Podman root | |
| 197 | + | "unix:///var/run/docker.sock", // Docker | |
| 199 | 198 | } | |
| 200 | 199 | ||
| 201 | - | // Add Podman rootless socket | |
| 200 | + | // Add Podman rootless socket first (preferred) | |
| 202 | 201 | if rootlessSocket := getDefaultPodmanSocket(true); rootlessSocket != "" { | |
| 203 | 202 | paths = append(paths, rootlessSocket) | |
| 204 | 203 | } | |
| 205 | 204 | ||
| 205 | + | // Add Podman root socket last | |
| 206 | + | paths = append(paths, "unix:///run/podman/podman.sock") | |
| 207 | + | ||
| 206 | 208 | return paths | |
| 207 | 209 | } | |
| 208 | 210 | ||
| @@ -194,15 +194,17 @@ func detectRuntimeType(socketPath string) RuntimeType { | |||||
| 194 | // getDefaultSocketPaths returns the default socket paths to try | 194 | // getDefaultSocketPaths returns the default socket paths to try | ||
| 195 | func getDefaultSocketPaths() []string { | 195 | func getDefaultSocketPaths() []string { | ||
| 196 | paths := []string{ | 196 | paths := []string{ | ||
| 197 | - | "unix:///var/run/docker.sock", // Docker | 197 | + | "unix:///var/run/docker.sock", // Docker |
| 198 | - | "unix:///run/podman/podman.sock", // Podman root | |||
| 199 | } | 198 | } | ||
| 200 | 199 | ||||
| 201 | - | // Add Podman rootless socket | 200 | + | // Add Podman rootless socket first (preferred) |
| 202 | if rootlessSocket := getDefaultPodmanSocket(true); rootlessSocket != "" { | 201 | if rootlessSocket := getDefaultPodmanSocket(true); rootlessSocket != "" { | ||
| 203 | paths = append(paths, rootlessSocket) | 202 | paths = append(paths, rootlessSocket) | ||
| 204 | } | 203 | } | ||
| 205 | 204 | ||||
| 205 | + | // Add Podman root socket last | |||
| 206 | + | paths = append(paths, "unix:///run/podman/podman.sock") | |||
| 207 | + | ||||
| 206 | return paths | 208 | return paths | ||
| 207 | } | 209 | } | ||
| 208 | 210 | ||||