설정 파일을 통한 배포
1. 배포파일 작성하기
아래 내용을 .cloudtype/app.yaml
파일로 생성하세요.
name: myappapp: node@16options:git:branch: mainurl: https://github.com/cloudtype-examples/node-express.gitenv:- name: NODE_ENVvalue: productioninstall: npm ci --productionports: 3000start: npm start
2. 배포하기
아래와 같이 인수가 없는 경우 .cloudtype/app.yaml
파일을 사용하여 배포됩니다.
$ ctype apply1 apps deployed to @demo/myproject└ app "node" deployed to stage main
배포할 설정 파일을 지정하려는 경우 파일명을 직접 지정할 수 있습니다.
$ ctype apply -f myapp.yaml
3. 배포 확인
$ ctype lsCurrent stage is "@demo/myproject:main"NAME APP CREATED UPDATEDnode node@16 2022-01-11 03:57:37 2022-01-12 20:35:56
프리셋
프리셋을 통해 설정 파일 생성하기
제공하는 플랫폼별 프리셋으로 설정 파일을 생성할 수 있습니다.
1. 프리셋 조회
$ ctype presets58 presets found.NAME DISPLAY NAME EXAMPLEreact React https://github.com/cloudtype-examples/react.gitvue-2 Vue 2 https://github.com/cloudtype-examples/vue2.gitvue-3 Vue 3 https://github.com/cloudtype-examples/vue3.gitangular Angular https://github.com/cloudtype-examples/angular.githtml HTML https://github.com/cloudtype-examples/html.gitgatsby Gatsby https://github.com/cloudtype-examples/gatsby.gitsvelte Svelte https://github.com/cloudtype-examples/svelte.gitastro Astro https://github.com/cloudtype-examples/astro.gitlit-element-vite Lit (vite) https://github.com/cloudtype-examples/lit.gitpreact-vite Preact (vite) https://github.com/cloudtype-examples/preact.gitreact-vite React (vite) https://github.com/cloudtype-examples/react-vite.gitsvelte-vite Svelte (vite) https://github.com/cloudtype-examples/svelte-vite.gitvanilla-vite VanillaJS (vite) https://github.com/cloudtype-examples/vanilla.gitwebpack-5 Webpack 5 https://github.com/cloudtype-examples/webpack5.gitnode Node.js https://github.com/cloudtype-examples/node-express.gitnext.js-11 Next.js 11 https://github.com/cloudtype-examples/nextjs.gitnext.js-12 Next.js 12 https://github.com/cloudtype-examples/nextjs12.gitnext.js Next.js 13 https://github.com/cloudtype-examples/nextjs13.gitnuxt.js Nuxt.js https://github.com/cloudtype-examples/nuxtjs.gitnest.js NestJS https://github.com/cloudtype-examples/nestjs.gitremix Remix https://github.com/cloudtype-examples/remix.gitexpress-graphql GraphQL(express) https://github.com/cloudtype-examples/express-graphqlnext-prisma Prisma(Next 13) https://github.com/cloudtype-examples/next-prisma.gitfastify Fastify https://github.com/cloudtype-examples/fastify.gitpython-django Python Django https://github.com/cloudtype-examples/python-django.gitpython-flask Python Flask https://github.com/cloudtype-examples/flask.gitpython-fastapi Python FastAPI https://github.com/cloudtype-examples/fastapi.gitpython-streamlit Python Streamlit https://github.com/cloudtype-examples/streamlit.gitjava-springboot Spring Boot https://github.com/cloudtype-examples/java-springboot.gitkotlin Kotlin https://github.com/cloudtype-examples/kotlin.gitdotnet .NET https://github.com/cloudtype-examples/dotnet.gitgolang Go https://github.com/cloudtype-examples/golang.gitgin gin https://github.com/cloudtype-examples/gin.gitfiber Fiber https://github.com/cloudtype-examples/go-fiber.gitdeno Deno https://github.com/cloudtype-examples/deno.gitphp PHP https://github.com/cloudtype-examples/php.gitruby-rails Ruby on Rails https://github.com/cloudtype-examples/ruby-on-rails.gitruby-sinatra Ruby Sinatra https://github.com/cloudtype-examples/ruby-sinatra.gitbuildpacks Buildpacks https://github.com/cloudtype/example-node-express.gitcontainer Containerdockerfile Dockerfile https://github.com/cloudtype-examples/dockerfile.gitmariadb MariaDBmongo MongoDBpostgresql PostgreSQLredis Rediscode-server Code Serverelasticsearch Elasticsearchkafka Apache Kafkanginx nginxselect Select Admin https://github.com/cloudtype/example-select.gitdiscordbot-js Discord Bot(JS) https://github.com/cloudtype-examples/discordbot-js.gitdiscordbot-py Discord Bot(Python) https://github.com/cloudtype-examples/discordbot-py.gitslackbot-js Slack Bot(JS) https://github.com/cloudtype-examples/slackbot-js.gitslackbot-py Slack Bot(Python) https://github.com/cloudtype-examples/slackbot-py.gitghost ghostjekyll Jekyll https://github.com/cloudtype/example-jekyll.gitwordpress Wordpressdocusaurus Docusaurus https://github.com/cloudtype-examples/example-docusaurus.git
2. 설정 파일 생성하기
원하는 프리셋 이름으로 설정 파일을 생성하세요.
파일을 지정하지 않은 경우 .cloudtype/app.yaml
파일로 생성됩니다.
$ ctype create node/expressConfiguration file created. .cloudtype/app.yaml
배포하기
$ ctype apply1 apps deployed to @demo/myproject└ app "node" deployed to stage main
-f
(--file
) 옵션을 사용해서 원하는 파일명을 지정할 수 있습니다.
아래 예시는 config/myapp.yaml
파일로 생성합니다.
$ ctype create node/express -f config/myapp.yamlConfiguration file created. config/myapp.yaml
배포하기
$ ctype apply -f config/myapp.yaml1 apps deployed to @demo/myproject└ app "node" deployed to stage main