docs(getting-started): replace manual docker registry steps with gordon push flow
- commit
- ecc578ce395117e6d607daa8d5fd3d85cb2aa643
- author
- bnema · · 2026-02-11 04:10 UTC
- parent
- 20b9aac
- signature
- unsigned
1 file · +17 -15
M docs/getting-started.md +17 -15
| @@ -118,31 +118,35 @@ sudo loginctl enable-linger $USER | |||
| 118 | 118 | ||
| 119 | 119 | ## 7. Generate a Deploy Token | |
| 120 | 120 | ||
| 121 | - | Create a token for pushing images to your registry (skip if auth is disabled): | |
| 121 | + | Create a token for remote CLI deploys (skip if auth is disabled): | |
| 122 | 122 | ||
| 123 | 123 | ```bash | |
| 124 | 124 | gordon auth token generate --subject deploy --scopes push,pull --expiry 0 | |
| 125 | 125 | ``` | |
| 126 | 126 | ||
| 127 | - | Save this token securely - you'll need it for Docker login. | |
| 127 | + | Save this token securely - you'll use it with `gordon --remote` (or a saved remote). | |
| 128 | 128 | ||
| 129 | 129 | ## 8. Deploy Your First App | |
| 130 | 130 | ||
| 131 | 131 | On your local machine: | |
| 132 | 132 | ||
| 133 | 133 | ```bash | |
| 134 | - | # Log in to your Gordon registry (skip if auth is disabled) | |
| 135 | - | docker login -u deploy -p <your-token> registry.mydomain.com | |
| 134 | + | # Save and select your Gordon remote (one-time) | |
| 135 | + | gordon remotes add prod https://gordon.mydomain.com --token <your-token> | |
| 136 | + | gordon remotes use prod | |
| 136 | 137 | ||
| 137 | - | # Build your app | |
| 138 | - | docker build -t myapp . | |
| 138 | + | # Build, push, and deploy through Gordon | |
| 139 | + | gordon push myapp --build --no-confirm | |
| 140 | + | ``` | |
| 139 | 141 | ||
| 140 | - | # Tag for your registry | |
| 141 | - | docker tag myapp registry.mydomain.com/myapp:latest | |
| 142 | + | What this command does: | |
| 142 | 143 | ||
| 143 | - | # Push to Gordon | |
| 144 | - | docker push registry.mydomain.com/myapp:latest | |
| 145 | - | ``` | |
| 144 | + | - `gordon push myapp` resolves the route for `myapp`, chooses a version tag, | |
| 145 | + | pushes image tags to Gordon's registry, and triggers deploy. | |
| 146 | + | - `--build` runs `docker buildx build` first, injecting `VERSION` from the tag | |
| 147 | + | into the build and then pushing both version and `latest` tags. | |
| 148 | + | - `--no-confirm` skips the interactive "Deploy now?" prompt so the deploy runs | |
| 149 | + | immediately. | |
| 146 | 150 | ||
| 147 | 151 | Your app is now live at `https://app.mydomain.com`! | |
| 148 | 152 | ||
| @@ -151,10 +155,8 @@ Your app is now live at `https://app.mydomain.com`! | |||
| 151 | 155 | Push a new image to deploy with zero downtime: | |
| 152 | 156 | ||
| 153 | 157 | ```bash | |
| 154 | - | # Make changes, rebuild | |
| 155 | - | docker build -t myapp . | |
| 156 | - | docker tag myapp registry.mydomain.com/myapp:latest | |
| 157 | - | docker push registry.mydomain.com/myapp:latest | |
| 158 | + | # Make changes, then build + push + deploy | |
| 159 | + | gordon push myapp --build --no-confirm | |
| 158 | 160 | ``` | |
| 159 | 161 | ||
| 160 | 162 | Gordon automatically: | |
| @@ -118,31 +118,35 @@ sudo loginctl enable-linger $USER | |||||
| 118 | 118 | ||||
| 119 | ## 7. Generate a Deploy Token | 119 | ## 7. Generate a Deploy Token | ||
| 120 | 120 | ||||
| 121 | - | Create a token for pushing images to your registry (skip if auth is disabled): | 121 | + | Create a token for remote CLI deploys (skip if auth is disabled): |
| 122 | 122 | ||||
| 123 | ```bash | 123 | ```bash | ||
| 124 | gordon auth token generate --subject deploy --scopes push,pull --expiry 0 | 124 | gordon auth token generate --subject deploy --scopes push,pull --expiry 0 | ||
| 125 | ``` | 125 | ``` | ||
| 126 | 126 | ||||
| 127 | - | Save this token securely - you'll need it for Docker login. | 127 | + | Save this token securely - you'll use it with `gordon --remote` (or a saved remote). |
| 128 | 128 | ||||
| 129 | ## 8. Deploy Your First App | 129 | ## 8. Deploy Your First App | ||
| 130 | 130 | ||||
| 131 | On your local machine: | 131 | On your local machine: | ||
| 132 | 132 | ||||
| 133 | ```bash | 133 | ```bash | ||
| 134 | - | # Log in to your Gordon registry (skip if auth is disabled) | 134 | + | # Save and select your Gordon remote (one-time) |
| 135 | - | docker login -u deploy -p <your-token> registry.mydomain.com | 135 | + | gordon remotes add prod https://gordon.mydomain.com --token <your-token> |
| 136 | + | gordon remotes use prod | |||
| 136 | 137 | ||||
| 137 | - | # Build your app | 138 | + | # Build, push, and deploy through Gordon |
| 138 | - | docker build -t myapp . | 139 | + | gordon push myapp --build --no-confirm |
| 140 | + | ``` | |||
| 139 | 141 | ||||
| 140 | - | # Tag for your registry | 142 | + | What this command does: |
| 141 | - | docker tag myapp registry.mydomain.com/myapp:latest | |||
| 142 | 143 | ||||
| 143 | - | # Push to Gordon | 144 | + | - `gordon push myapp` resolves the route for `myapp`, chooses a version tag, |
| 144 | - | docker push registry.mydomain.com/myapp:latest | 145 | + | pushes image tags to Gordon's registry, and triggers deploy. |
| 145 | - | ``` | 146 | + | - `--build` runs `docker buildx build` first, injecting `VERSION` from the tag |
| 147 | + | into the build and then pushing both version and `latest` tags. | |||
| 148 | + | - `--no-confirm` skips the interactive "Deploy now?" prompt so the deploy runs | |||
| 149 | + | immediately. | |||
| 146 | 150 | ||||
| 147 | Your app is now live at `https://app.mydomain.com`! | 151 | Your app is now live at `https://app.mydomain.com`! | ||
| 148 | 152 | ||||
| @@ -151,10 +155,8 @@ Your app is now live at `https://app.mydomain.com`! | |||||
| 151 | Push a new image to deploy with zero downtime: | 155 | Push a new image to deploy with zero downtime: | ||
| 152 | 156 | ||||
| 153 | ```bash | 157 | ```bash | ||
| 154 | - | # Make changes, rebuild | 158 | + | # Make changes, then build + push + deploy |
| 155 | - | docker build -t myapp . | 159 | + | gordon push myapp --build --no-confirm |
| 156 | - | docker tag myapp registry.mydomain.com/myapp:latest | |||
| 157 | - | docker push registry.mydomain.com/myapp:latest | |||
| 158 | ``` | 160 | ``` | ||
| 159 | 161 | ||||
| 160 | Gordon automatically: | 162 | Gordon automatically: | ||