# Quais são todos os hooks que posso usar em app.yml

**URL:** https://meta.discourse.org/t/what-are-all-the-hook-types-i-can-use-in-app-yml/387953
**Category:** Support
**Created:** [Novembro 8, 2025, 8:49pm UTC](https://meta.discourse.org/t/what-are-all-the-hook-types-i-can-use-in-app-yml/387953 "2025-11-08T20:49:01Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Jonathan\_Candler](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathan_candler/32/528393_2.png) [@Jonathan\_Candler](https://meta.discourse.org/u/Jonathan_Candler)
#### Post date: [Novembro 8, 2025, 8:49pm UTC](https://meta.discourse.org/t/what-are-all-the-hook-types-i-can-use-in-app-yml/387953/1 "2025-11-08T20:49:01Z")

</div>

Olá, estou tentando configurar um hook para conectar automaticamente à minha rede Docker quando o Discourse reiniciar ou iniciar após a compilação. Isso é para que eu possa usar o atualizador web de administrador quando puder, mas estou tentando descobrir a melhor maneira de fazer isso. A documentação não diz muito sobre os tipos de hook que posso usar e procurar por hooks como `after_post_boot` e `after_restart` não produz resultados. Esses hooks não funcionam mais e, se sim, por quê? Aqui está o meu código de hooks.

```yaml
hooks:

## begin custom network hook

after_restart:
- exec:
cmd:
- bash
- “-c”
- |\
# Connect Discourse to the custom Docker network if not already connected
NETWORK_NAME=“proxy”
CONTAINER_NAME=$(hostname)

        # Create the network if it doesn't exist
        if ! docker network inspect "$NETWORK_NAME" >/dev/null 2>&1; then
          echo "Creating Docker network: $NETWORK_NAME"
          docker network create "$NETWORK_NAME"
        fi

        # Connect container to the network (ignore if already connected)
        echo "Connecting $CONTAINER_NAME to $NETWORK_NAME..."
        docker network connect "$NETWORK_NAME" "$CONTAINER_NAME" 2>/dev/null || true

        echo "Network connection complete."
## END custom network hook

```

---

_[View the full topic](https://meta.discourse.org/t/what-are-all-the-hook-types-i-can-use-in-app-yml/387953)._
