> Discover all available pages from the documentation index: https://mastra.zisheng.pro/ko/llms.txt # 디지털 오션에 Mastra 배포 이 가이드에서는 Digital Ocean의 앱 플랫폼과 Droplet을 다룹니다. 이러한 각 제품에는 고유한 장점이 있으며 다양한 유형의 프로젝트 및 개발자 전문 지식에 적합합니다. 읽다[Digital Ocean's comparison](https://www.digitalocean.com/community/conceptual-articles/digitalocean-app-platform-vs-doks-vs-droplets)차이점을 이해하고 프로젝트에 가장 적합한 옵션을 선택하세요. > **정보:** 이 가이드에서는[Mastra server](https://mastra.zisheng.pro/ko/docs/server/mastra-server). If you're using a [server adapter](https://mastra.zisheng.pro/ko/docs/server/server-adapters)또는[웹 프레임워크](https://mastra.zisheng.pro/ko/docs/deployment/web-framework), 해당 프레임워크에 대해 일반적인 방식으로 배포합니다. ## 시작하기 전에 당신은[Mastra application](https://mastra.zisheng.pro/ko/guides/getting-started/quickstart) and a [Digital Ocean](https://www.digitalocean.com/) account. 그만큼**App Platform** 는 임시 파일 시스템을 사용하므로 구성하는 모든 스토리지(Observability 스토리지 포함)는 외부에서 호스팅해야 합니다. [LibSQLStore](https://mastra.zisheng.pro/ko/reference/storage/libsql) 를 파일 URL과 함께 사용하고 있다면 원격으로 호스팅되는 데이터베이스로 전환하세요. ## 앱 플랫폼 프로젝트를 설정한 후 선택한 원격 Git 공급자(예: GitHub)에 푸시하세요. 1. 공식 팔로우[App Platform quickstart](https://docs.digitalocean.com/products/app-platform/getting-started/quickstart/#create-an-app). 이 과정에서는 리포지토리 연결, 배포할 브랜치 선택, 필요한 경우 소스 디렉터리 구성 방법을 안내합니다. 2. "Node.js" 빌드가 감지되는지 확인하세요. 빌드 명령을 구성해야 합니다. 패키지 관리자에 따라 설정하십시오. **npm**: ```bash npm run build ``` **pnpm**: ```bash pnpm run build ``` **Yarn**: ```bash yarn build ``` **Bun**: ```bash bun run build ``` 3. Mastra 애플리케이션에 필요한 환경 변수를 추가합니다. 여기에는 API 키, 데이터베이스 URL 및 기타 구성 값이 포함됩니다. 4. 앱이 자동으로 구축되고 배포됩니다. Digital Ocean은 배포된 애플리케이션에 액세스할 수 있는 URL을 제공합니다. 5. 이제 HTTP를 통해 Mastra 엔드포인트를 호출할 수 있습니다. > **경고:** 설정[authentication](https://mastra.zisheng.pro/ko/docs/server/auth) before exposing your endpoints publicly. ## 비말 ### 전제조건 - Ubuntu 24.04 LTS 이상을 실행하는 Droplet - 드롭릿을 가리키는 A 레코드가 있는 도메인 이름 - 구성된 역방향 프록시(예:[nginx](https://nginx.org/)) - 구성된 SSL 인증서(예:[Let's Encrypt](https://letsencrypt.org/)) - Node.js 22.13.0 이상이 드롭릿에 설치됨 ### 배포 프로젝트를 설정한 후 선택한 원격 Git 공급자(예: GitHub)에 푸시하세요. Droplet에 연결하고 확인하십시오.`git` is installed. 1. 저장소를 복제합니다. **Public Repository**: ```bash git clone https://github.com//.git ``` **Private Repository**: ```bash git clone https://:@github.com//.git ``` 저장소 디렉터리로 이동합니다. ```bash cd "" ``` 2. 프로젝트 종속성을 설치합니다. **npm**: ```bash npm install ``` **pnpm**: ```bash pnpm install ``` **Yarn**: ```bash yarn install ``` **Bun**: ```bash bun install ``` 3. Mastra 애플리케이션에 필요한 환경 변수를 설정합니다. 만들기`.env` file in the root of your project: ```bash touch .env ``` 편집하다`.env` file and add your environment variables: ```bash OPENAI_API_KEY=your-api-key ``` 4. 프로젝트를 빌드합니다. **npm**: ```bash npm run build ``` **pnpm**: ```bash pnpm run build ``` **Yarn**: ```bash yarn build ``` **Bun**: ```bash bun run build ``` 이렇게 하면 Mastra 서버의 프로덕션 빌드가 생성됩니다.`.mastra/output` directory. 5. 당신은 실행할 수 있습니다[Mastra Server](https://mastra.zisheng.pro/ko/docs/deployment/mastra-server) by running the `mastra start` command: ```bash mastra start ``` > **정보:** Mastra 애플리케이션은 기본적으로 포트 4111에서 실행됩니다. 요청을 이 포트로 전달하도록 역방향 프록시가 구성되어 있는지 확인하세요. 6. 이제 HTTP를 통해 Mastra 엔드포인트를 호출할 수 있습니다. > **경고:** 설정[authentication](https://mastra.zisheng.pro/ko/docs/server/auth) before exposing your endpoints publicly. ## 관련된 - [디지털 오션 앱 플랫폼](https://docs.digitalocean.com/products/app-platform/) - [디지털 바다 물방울](https://docs.digitalocean.com/products/droplets/)