> For the complete documentation index, see [llms.txt](https://abi.gitbook.io/net-core/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://abi.gitbook.io/net-core/12.-entrega-continua-continuous-delivery/12.-publicar-en-azure.md).

# 15.1 Crear un App Service en Azure

Puedes publicar tu sitio web en azure de forma gratuita. Si nunca has utilizado Azure se te da un año gratuito para que conozcas Azure y pruebes los diferentes servicios con los que cuenta. Se te pedirá tarjeta de crédito. Crea y registra tu cuenta en Azure en el siguiente link

{% embed url="<https://azure.microsoft.com/es-es/>" %}

Para publicar nuestros servicios rest vamos a utilizar el servicio App Service.

![](/files/-LzT5ziqO7xWfkuteYt8)

Da clic en el botón Crear App Service

![](/files/-LzT6F9bKfQLOWP_Ddss)

LLena los datos que se te solicitan

![](/files/-MOvypaCMwwoWfeECOOw)

**Suscripción**: Selecciona tu suscripción en mi caso se llama Pago por uso ya que ya utilice la cuenta gratuita.

**Grupo de recursos:** Azure te permite agrupar tus servicios por grupos para por ejemplo si tienes muchos clientes diferentes los agrupas por cliente.

**Nombre**: agrega el nombre que dseeas para tus servicios en mi caso es caducarest

**Publicar**: Selecciona Código, otra opción de publicar tu código es mediante docker, el cual como su nombre lo dice es un contenedor que previamente configuras con todo lo necesario para publicar tus servicios, el tema de docker se verá en otra sección.

**Pila del entorno en tiempo de ejecución**: Selecciona la versión de .net Core, en mi caso estoy utilizando la versión .NET 5.

**Sistema Operativo**: Selecciona Linux ya que suele ser mas económico.

**Región**: Selecciona una región cercana a la ciudad donde vives.

Selecciona un nuevo plan, en mi caso le llame Linux. Cambia la sugerencia de un servicio Premium, dando clic en Cambiar el tamaño, se te abre al lado derecho para que elijas la opción en mi caso elegiré un plan gratuito, el cual solo tiene 1 GB de memoria.&#x20;

Da clic en **Aplicar** y luego en **Revisar y crear**

![](/files/-LzT8o0Do3iZYhjm-VZi)

Por último da clic en crear y espera un momento en lo que Azure prepara todo para que puedas publicar tus servicios.

Para practicar puedes crear otro servicio con Windows solamente para agregar mas servidores de pruebas, uno con Linux y otro con versión.

Para correr en Windows, tuve que agregar unas variables en la sección de Configuración:

```
[
  {
    "name": "WEBSITE_ENABLE_SYNC_UPDATE_SITE",
    "value": "true",
    "slotSetting": false
  },
  {
    "name": "WEBSITE_RUN_FROM_PACKAGE",
    "value": "1",
    "slotSetting": false
  }
]
```

![](/files/-MOvz_DJHVE1a7iPJfmA)

Otra opción interesante es que te permite definir tu cadena de conexión desde el sitio para que no la tengas en configurar desde tu proceso de CI/CD.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://abi.gitbook.io/net-core/12.-entrega-continua-continuous-delivery/12.-publicar-en-azure.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
