> ## 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.

# 배포

## 배포

### 서비스 배포

<Steps>
  <Step title="배포하고자 하는 서비스의 YAML 파일 경로를 파라미터로 넘겨 명령어를 실행합니다.">
    ```bash theme={null}
    ale apply -f <YAML파일 경로>
    # apply -f ./node-express.yaml
    ```
  </Step>

  <Step title="프로젝트 배포가 시작되면 다음과 같이 메세지가 출력됩니다.">
    ```bash theme={null}
    1 apps deployed to @admin/test
      └ app "node-express" deployed to stage main
    ```
  </Step>
</Steps>

### 서비스 업데이트

<Steps>
  <Step title="업데이트 할 대상 서비스의 YAML 파일 경로를 파라미터로 넘겨 명령어를 실행합니다.">
    ```bash theme={null}
    ale apply -f <YAML파일 경로>
    # ale apply -f ./node-express.yaml
    ```
  </Step>

  <Step title="업데이트된 내용으로 배포가 시작되면 다음과 같이 메세지가 출력됩니다.">
    ```bash theme={null}
    1 apps deployed to @admin/test
      └ app "node-express" deployed to stage main
    ```
  </Step>
</Steps>

### 서비스 삭제

<Steps>
  <Step title="삭제하고자 하는 서비스명을 파라미터로 넘겨 명령어를 실행합니다.">
    ```bash theme={null}
    ale remove <서비스명>
    # ale remove node-express
    ```
  </Step>

  <Step title="서비스가 정상적으로 삭제되면 다음과 같이 결과가 출력됩니다.">
    ```bash theme={null}
    deployment "node-express" removed from @admin/test:main.
    1 deployments removed
    ```
  </Step>
</Steps>

***

## 서비스 정보 및 접근

### 서비스 로그 조회

<Steps>
  <Step title="로그를 조회하고자 하는 서비스명을 파라미터로 넘겨 다음의 명령어를 실행합니다.">
    ```bash theme={null}
    ale logs <서비스명>
    # ale logs node-express
    ```
  </Step>

  <Step title="정상적으로 서비스가 실행 중인 경우 로그가 표시됩니다.">
    ```bash theme={null}

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

    ```
  </Step>
</Steps>

### 서비스 터미널 접속

<Steps>
  <Step title="터미널로 접근하고자 하는 서비스명을 파라미터로 넘겨 다음의 명령어를 실행합니다.">
    ```bash theme={null}
    ale logs <서비스명>
    # ale terminal node-express
    ```
  </Step>

  <Step title="정상적으로 서비스가 실행 중인 경우 터미널을 통해 서비스에 접속됩니다.">
    ```bash theme={null}
    node@node-express:/app$
    ```
  </Step>
</Steps>
