Skip to content
Merged
22 changes: 22 additions & 0 deletions .vortex/docs/content/development/environment/pygmy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,25 @@ pygmy restart # Restart the services.
pygmy status # Show the status of the services.
pygmy clean # Stop and remove all services. Useful if you have issues with pygmy.
```

## SSH key in the CLI container

The CLI container uses the SSH agent from Pygmy's `amazeeio-ssh-agent`
container. It mounts the agent's volume through `volumes_from` and links to the
agent's socket only when the CLI container starts.

`pygmy restart` removes the agent container and creates a new one. If the stack
is running at the time, the CLI container stays attached to the previous agent,
so the SSH key is no longer available inside it. The same happens when the
stack starts before Pygmy.

Recreate the CLI container to attach it to the current agent:

```shell
ahoy up --no-deps --force-recreate cli
```

Running `ahoy up` on its own isn't enough: Docker Compose leaves a running
container alone when its configuration hasn't changed. [`ahoy doctor`](doctor.mdx)
checks that the SSH key is available in the CLI container and prints this
command when it isn't.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ services:
<<: [ *default-volumes, *default-user ]
depends_on:
- cli
- php
networks:
- default # This is a standard network and is used for all other environments, where requests routing is not required and/or not supported.
- amazeeio-network ### This network is supported by Pygmy and used to route all requests to host machine locally. Removed in CI.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -155,17 +155,6 @@
@@ -156,17 +156,6 @@
redis:
image: uselagoon/valkey-8:__VERSION__

Expand All @@ -16,7 +16,7 @@
clamav:
build:
context: .
@@ -196,13 +185,10 @@
@@ -197,13 +186,10 @@
- clamav
- database
- redis
Expand All @@ -30,7 +30,7 @@

networks: ### Use external networks locally. Automatically removed in CI.
amazeeio-network: ### Automatically removed in CI.
@@ -211,7 +197,6 @@
@@ -212,7 +198,6 @@
volumes:
app: {}
files: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

nginx:
build:
@@ -124,6 +129,11 @@
@@ -125,6 +130,11 @@
networks:
- default # This is a standard network and is used for all other environments, where requests routing is not required and/or not supported.
- amazeeio-network ### This network is supported by Pygmy and used to route all requests to host machine locally. Removed in CI.
Expand All @@ -29,7 +29,7 @@

# PHP FPM container. All web requests are going through this container.
php:
@@ -139,6 +149,11 @@
@@ -140,6 +150,11 @@
<<: [ *default-volumes, *default-user ]
depends_on:
- cli
Expand All @@ -41,7 +41,7 @@

database:
build:
@@ -151,9 +166,13 @@
@@ -152,9 +167,13 @@
<<: *default-user
ports:
- '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`.
Expand All @@ -55,7 +55,7 @@

solr:
build:
@@ -165,6 +184,8 @@
@@ -166,6 +185,8 @@
- solr:/var/solr
ports:
- '8983' # Solr port in a container. Find port on host with `ahoy info` or `docker compose port solr 8983`.
Expand All @@ -64,7 +64,7 @@

clamav:
build:
@@ -176,6 +197,10 @@
@@ -177,6 +198,10 @@
- '3310' # Find port on host with `docker compose port clamav 3310`.
networks:
- default
Expand All @@ -75,7 +75,7 @@

# Chrome container, used for browser testing.
chrome:
@@ -188,6 +213,8 @@
@@ -189,6 +214,8 @@
ports:
- '7900' # Find port on host with `docker compose port chrome 7900`.
shm_size: '1gb' # Increase '/dev/shm' partition size to avoid browser crashing.
Expand All @@ -84,7 +84,7 @@

# Helper container to wait for services to become available.
wait-for-dependencies:
@@ -203,6 +230,8 @@
@@ -204,6 +231,8 @@
- redis:6379
- solr:8983
- curl -s "http://solr:8983/solr/drupal/select?q=*:*&rows=0&wt=json" | grep response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

nginx:
build:
@@ -124,6 +129,11 @@
@@ -125,6 +130,11 @@
networks:
- default # This is a standard network and is used for all other environments, where requests routing is not required and/or not supported.
- amazeeio-network ### This network is supported by Pygmy and used to route all requests to host machine locally. Removed in CI.
Expand All @@ -29,7 +29,7 @@

# PHP FPM container. All web requests are going through this container.
php:
@@ -139,6 +149,11 @@
@@ -140,6 +150,11 @@
<<: [ *default-volumes, *default-user ]
depends_on:
- cli
Expand All @@ -41,7 +41,7 @@

database:
build:
@@ -151,9 +166,13 @@
@@ -152,9 +167,13 @@
<<: *default-user
ports:
- '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`.
Expand All @@ -55,7 +55,7 @@

solr:
build:
@@ -165,6 +184,8 @@
@@ -166,6 +185,8 @@
- solr:/var/solr
ports:
- '8983' # Solr port in a container. Find port on host with `ahoy info` or `docker compose port solr 8983`.
Expand All @@ -64,7 +64,7 @@

clamav:
build:
@@ -176,6 +197,10 @@
@@ -177,6 +198,10 @@
- '3310' # Find port on host with `docker compose port clamav 3310`.
networks:
- default
Expand All @@ -75,7 +75,7 @@

# Chrome container, used for browser testing.
chrome:
@@ -188,6 +213,8 @@
@@ -189,6 +214,8 @@
ports:
- '7900' # Find port on host with `docker compose port chrome 7900`.
shm_size: '1gb' # Increase '/dev/shm' partition size to avoid browser crashing.
Expand All @@ -84,7 +84,7 @@

# Helper container to wait for services to become available.
wait-for-dependencies:
@@ -203,6 +230,8 @@
@@ -204,6 +231,8 @@
- redis:6379
- solr:8983
- curl -s "http://solr:8983/solr/drupal/select?q=*:*&rows=0&wt=json" | grep response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

nginx:
build:
@@ -124,6 +129,11 @@
@@ -125,6 +130,11 @@
networks:
- default # This is a standard network and is used for all other environments, where requests routing is not required and/or not supported.
- amazeeio-network ### This network is supported by Pygmy and used to route all requests to host machine locally. Removed in CI.
Expand All @@ -29,7 +29,7 @@

# PHP FPM container. All web requests are going through this container.
php:
@@ -139,6 +149,11 @@
@@ -140,6 +150,11 @@
<<: [ *default-volumes, *default-user ]
depends_on:
- cli
Expand All @@ -41,7 +41,7 @@

database:
build:
@@ -151,9 +166,13 @@
@@ -152,9 +167,13 @@
<<: *default-user
ports:
- '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`.
Expand All @@ -55,7 +55,7 @@

solr:
build:
@@ -165,6 +184,8 @@
@@ -166,6 +185,8 @@
- solr:/var/solr
ports:
- '8983' # Solr port in a container. Find port on host with `ahoy info` or `docker compose port solr 8983`.
Expand All @@ -64,7 +64,7 @@

clamav:
build:
@@ -176,6 +197,10 @@
@@ -177,6 +198,10 @@
- '3310' # Find port on host with `docker compose port clamav 3310`.
networks:
- default
Expand All @@ -75,7 +75,7 @@

# Chrome container, used for browser testing.
chrome:
@@ -188,6 +213,8 @@
@@ -189,6 +214,8 @@
ports:
- '7900' # Find port on host with `docker compose port chrome 7900`.
shm_size: '1gb' # Increase '/dev/shm' partition size to avoid browser crashing.
Expand All @@ -84,7 +84,7 @@

# Helper container to wait for services to become available.
wait-for-dependencies:
@@ -203,6 +230,8 @@
@@ -204,6 +231,8 @@
- redis:6379
- solr:8983
- curl -s "http://solr:8983/solr/drupal/select?q=*:*&rows=0&wt=json" | grep response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

# The default user under which the containers should run.
x-user: &default-user
@@ -152,6 +162,19 @@
@@ -153,6 +163,19 @@
ports:
- '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`.

Expand All @@ -35,7 +35,7 @@
redis:
image: uselagoon/valkey-8:__VERSION__

@@ -195,11 +218,13 @@
@@ -196,11 +219,13 @@
depends_on:
- clamav
- database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

# The default user under which the containers should run.
x-user: &default-user
@@ -152,6 +162,19 @@
@@ -153,6 +163,19 @@
ports:
- '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`.

Expand All @@ -35,7 +35,7 @@
redis:
image: uselagoon/valkey-8:__VERSION__

@@ -195,11 +218,13 @@
@@ -196,11 +219,13 @@
depends_on:
- clamav
- database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

nginx:
build:
@@ -124,6 +139,11 @@
@@ -125,6 +140,11 @@
networks:
- default # This is a standard network and is used for all other environments, where requests routing is not required and/or not supported.
- amazeeio-network ### This network is supported by Pygmy and used to route all requests to host machine locally. Removed in CI.
Expand All @@ -46,7 +46,7 @@

# PHP FPM container. All web requests are going through this container.
php:
@@ -139,6 +159,11 @@
@@ -140,6 +160,11 @@
<<: [ *default-volumes, *default-user ]
depends_on:
- cli
Expand All @@ -58,7 +58,7 @@

database:
build:
@@ -151,9 +176,26 @@
@@ -152,9 +177,26 @@
<<: *default-user
ports:
- '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`.
Expand All @@ -85,7 +85,7 @@

solr:
build:
@@ -165,6 +207,8 @@
@@ -166,6 +208,8 @@
- solr:/var/solr
ports:
- '8983' # Solr port in a container. Find port on host with `ahoy info` or `docker compose port solr 8983`.
Expand All @@ -94,7 +94,7 @@

clamav:
build:
@@ -176,6 +220,10 @@
@@ -177,6 +221,10 @@
- '3310' # Find port on host with `docker compose port clamav 3310`.
networks:
- default
Expand All @@ -105,7 +105,7 @@

# Chrome container, used for browser testing.
chrome:
@@ -188,6 +236,8 @@
@@ -189,6 +237,8 @@
ports:
- '7900' # Find port on host with `docker compose port chrome 7900`.
shm_size: '1gb' # Increase '/dev/shm' partition size to avoid browser crashing.
Expand All @@ -114,7 +114,7 @@

# Helper container to wait for services to become available.
wait-for-dependencies:
@@ -195,14 +245,18 @@
@@ -196,14 +246,18 @@
depends_on:
- clamav
- database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

# The default user under which the containers should run.
x-user: &default-user
@@ -152,6 +162,19 @@
@@ -153,6 +163,19 @@
ports:
- '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`.

Expand All @@ -35,7 +35,7 @@
redis:
image: uselagoon/valkey-8:__VERSION__

@@ -195,11 +218,13 @@
@@ -196,11 +219,13 @@
depends_on:
- clamav
- database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

# The default user under which the containers should run.
x-user: &default-user
@@ -152,6 +162,19 @@
@@ -153,6 +163,19 @@
ports:
- '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`.

Expand All @@ -35,7 +35,7 @@
redis:
image: uselagoon/valkey-8:__VERSION__

@@ -195,11 +218,13 @@
@@ -196,11 +219,13 @@
depends_on:
- clamav
- database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

# The default user under which the containers should run.
x-user: &default-user
@@ -152,6 +162,19 @@
@@ -153,6 +163,19 @@
ports:
- '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`.

Expand All @@ -35,7 +35,7 @@
redis:
image: uselagoon/valkey-8:__VERSION__

@@ -195,11 +218,13 @@
@@ -196,11 +219,13 @@
depends_on:
- clamav
- database
Expand Down
Loading
Loading