> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ale.run/llms.txt
> Use this file to discover all available pages before exploring further.

# Deployments

> Guide for deploying, updating, and managing services using the ale CLI

## Deployments

### Deploy a Service

<Steps>
  <Step title="Execute the command by passing the YAML file path of the service you want to deploy as a parameter">
    ```bash theme={null}
    ale apply -f <YAML file path>
    # apply -f ./node-express.yaml
    ```
  </Step>

  <Step title="When the project deployment begins, the following message will be displayed">
    ```bash theme={null}
    1 apps deployed to @admin/test
      └ app "node-express" deployed to stage main
    ```
  </Step>
</Steps>

### Update a Service

<Steps>
  <Step title="Execute the command by passing the YAML file path of the service you want to update as a parameter">
    ```bash theme={null}
    ale apply -f <YAML file path>
    # ale apply -f ./node-express.yaml
    ```
  </Step>

  <Step title="When the deployment starts with the updated content, the following message will be displayed">
    ```bash theme={null}
    1 apps deployed to @admin/test
      └ app "node-express" deployed to stage main
    ```
  </Step>
</Steps>

### Remove a Service

<Steps>
  <Step title="Execute the command by passing the name of the service you want to remove as a parameter">
    ```bash theme={null}
    ale remove <service-name>
    # ale remove node-express
    ```
  </Step>

  <Step title="When the service is successfully removed, the following result will be displayed">
    ```bash theme={null}
    deployment "node-express" removed from @admin/test:main.
    1 deployments removed
    ```
  </Step>
</Steps>

***

## Service Information and Access

### View Service Logs

<Steps>
  <Step title="Execute the following command by passing the name of the service whose logs you want to view as a parameter">
    ```bash theme={null}
    ale logs <service-name>
    # ale logs node-express
    ```
  </Step>

  <Step title="If the service is running normally, the logs will be displayed">
    ```bash theme={null}

    > myapp@0.0.0 start
    > node ./bin/www

    ```
  </Step>
</Steps>

### Access Service Terminal

<Steps>
  <Step title="Execute the following command by passing the name of the service you want to access via terminal as a parameter">
    ```bash theme={null}
    ale terminal <service-name>
    # ale terminal node-express
    ```
  </Step>

  <Step title="If the service is running normally, you will be connected to the service through the terminal">
    ```bash theme={null}
    node@node-express:/app$
    ```
  </Step>
</Steps>
