v2.7.0 fac7705

attachments.md RawHistoryFolder

Attachments Commands

Manage attachments on local or remote Gordon instances.

Requirements

Attachments require network_isolation.enabled = true in your configuration. Without network isolation, containers use Docker's default bridge network which does not provide DNS resolution - your app won't be able to reach attachments by hostname (e.g., postgres:5432).

The CLI will warn you if you try to add an attachment without network isolation enabled.

gordon attachments

Subcommands

Subcommand Description
list List all attachments or attachments for a specific target
add Add an attachment to a domain or network group
remove Remove an attachment from a domain or network group

Alias

gordon attach is an alias for gordon attachments:

gordon attach list
gordon attach add app.example.com postgres:18
gordon attach remove app.example.com postgres:18

gordon attachments list

List all configured attachments.

# List all attachments
gordon attachments list

# List attachments for a specific domain or group
gordon attachments list app.example.com
gordon attachments list backend

# Remote mode
gordon attachments list --remote https://gordon.mydomain.com --token $TOKEN

Output

Target                    Attachments
--------------------------------------------------------------------------------
app.example.com           postgres:18, redis:7-alpine
api.example.com           postgres:18
backend (group)           rabbitmq:3-management

gordon attachments add

Add an attachment to a domain or network group.

gordon attachments add <domain-or-group> <image>
gordon attachments add app.example.com postgres:18
gordon attachments add backend redis:7-alpine

Arguments

Argument Description
<domain-or-group> The domain name or network group name
<image> The container image to attach

Options

Option Description
--remote Remote Gordon URL
--token Authentication token for remote

Examples

# Add database to a domain
gordon attachments add app.example.com postgres:18

# Add cache to a network group (shared by all domains in the group)
gordon attachments add backend redis:7-alpine

# Remote
gordon attachments add app.example.com postgres:18 --remote https://gordon.mydomain.com --token $TOKEN

gordon attachments remove

Remove an attachment.

gordon attachments remove <domain-or-group> <image>
gordon attachments remove app.example.com postgres:18

Arguments

Argument Description
<domain-or-group> The domain name or network group name
<image> The container image to remove

Options

Option Description
--remote Remote Gordon URL
--token Authentication token for remote

Examples

# Remove database from a domain
gordon attachments remove app.example.com postgres:18

# Remove from network group
gordon attachments remove backend redis:7-alpine

# Remote
gordon attachments remove app.example.com postgres:18 --remote https://gordon.mydomain.com --token $TOKEN

Workflow Examples

Add Database and Cache

# Add PostgreSQL database
gordon attachments add app.example.com postgres:18

# Add Redis cache
gordon attachments add app.example.com redis:7-alpine

# Verify
gordon attachments list app.example.com

Shared Services via Network Groups

# First, ensure you have a network group defined in your config:
# [network_groups]
# "backend" = ["app.example.com", "api.example.com"]

# Add shared cache to the group
gordon attachments add backend redis:7-alpine

# Both app.example.com and api.example.com can now access the shared Redis

CI/CD Integration

# In your CI/CD pipeline
export GORDON_REMOTE=https://gordon.mydomain.com
export GORDON_TOKEN=$GORDON_TOKEN

# Add new attachment
gordon attachments add app.example.com elasticsearch:8

# Trigger redeploy to pick up the new attachment
gordon routes deploy app.example.com
source
1# Attachments Commands
2
3Manage attachments on local or remote Gordon instances.
4
5## Requirements
6
7Attachments require `network_isolation.enabled = true` in your configuration. Without network isolation, containers use Docker's default bridge network which does not provide DNS resolution - your app won't be able to reach attachments by hostname (e.g., `postgres:5432`).
8
9The CLI will warn you if you try to add an attachment without network isolation enabled.
10
11## gordon attachments
12
13### Subcommands
14
15| Subcommand | Description |
16|------------|-------------|
17| `list` | List all attachments or attachments for a specific target |
18| `add` | Add an attachment to a domain or network group |
19| `remove` | Remove an attachment from a domain or network group |
20
21### Alias
22
23`gordon attach` is an alias for `gordon attachments`:
24
25```bash
26gordon attach list
27gordon attach add app.example.com postgres:18
28gordon attach remove app.example.com postgres:18
29```
30
31---
32
33## gordon attachments list
34
35List all configured attachments.
36
37```bash
38# List all attachments
39gordon attachments list
40
41# List attachments for a specific domain or group
42gordon attachments list app.example.com
43gordon attachments list backend
44
45# Remote mode
46gordon attachments list --remote https://gordon.mydomain.com --token $TOKEN
47```
48
49### Output
50
51```
52Target                    Attachments
53--------------------------------------------------------------------------------
54app.example.com           postgres:18, redis:7-alpine
55api.example.com           postgres:18
56backend (group)           rabbitmq:3-management
57```
58
59---
60
61## gordon attachments add
62
63Add an attachment to a domain or network group.
64
65```bash
66gordon attachments add <domain-or-group> <image>
67gordon attachments add app.example.com postgres:18
68gordon attachments add backend redis:7-alpine
69```
70
71### Arguments
72
73| Argument | Description |
74|----------|-------------|
75| `<domain-or-group>` | The domain name or network group name |
76| `<image>` | The container image to attach |
77
78### Options
79
80| Option | Description |
81|--------|-------------|
82| `--remote` | Remote Gordon URL |
83| `--token` | Authentication token for remote |
84
85### Examples
86
87```bash
88# Add database to a domain
89gordon attachments add app.example.com postgres:18
90
91# Add cache to a network group (shared by all domains in the group)
92gordon attachments add backend redis:7-alpine
93
94# Remote
95gordon attachments add app.example.com postgres:18 --remote https://gordon.mydomain.com --token $TOKEN
96```
97
98---
99
100## gordon attachments remove
101
102Remove an attachment.
103
104```bash
105gordon attachments remove <domain-or-group> <image>
106gordon attachments remove app.example.com postgres:18
107```
108
109### Arguments
110
111| Argument | Description |
112|----------|-------------|
113| `<domain-or-group>` | The domain name or network group name |
114| `<image>` | The container image to remove |
115
116### Options
117
118| Option | Description |
119|--------|-------------|
120| `--remote` | Remote Gordon URL |
121| `--token` | Authentication token for remote |
122
123### Examples
124
125```bash
126# Remove database from a domain
127gordon attachments remove app.example.com postgres:18
128
129# Remove from network group
130gordon attachments remove backend redis:7-alpine
131
132# Remote
133gordon attachments remove app.example.com postgres:18 --remote https://gordon.mydomain.com --token $TOKEN
134```
135
136---
137
138## Workflow Examples
139
140### Add Database and Cache
141
142```bash
143# Add PostgreSQL database
144gordon attachments add app.example.com postgres:18
145
146# Add Redis cache
147gordon attachments add app.example.com redis:7-alpine
148
149# Verify
150gordon attachments list app.example.com
151```
152
153### Shared Services via Network Groups
154
155```bash
156# First, ensure you have a network group defined in your config:
157# [network_groups]
158# "backend" = ["app.example.com", "api.example.com"]
159
160# Add shared cache to the group
161gordon attachments add backend redis:7-alpine
162
163# Both app.example.com and api.example.com can now access the shared Redis
164```
165
166### CI/CD Integration
167
168```bash
169# In your CI/CD pipeline
170export GORDON_REMOTE=https://gordon.mydomain.com
171export GORDON_TOKEN=$GORDON_TOKEN
172
173# Add new attachment
174gordon attachments add app.example.com elasticsearch:8
175
176# Trigger redeploy to pick up the new attachment
177gordon routes deploy app.example.com
178```
179
180## Related
181
182- [CLI Overview](./index.md)
183- [Attachments Configuration](../config/attachments.md)
184- [Network Groups](../config/network-groups.md)

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close