Initialize gcloud by select/creating a project
Make sure that you’ve initialized the Google Cloud CLI. This command logs you in, and prompts you to either select an existing project or create a new one.For more help with the Google Cloud CLI, see the official documentation.terminalCopygcloud init CopyWelcome! This command will take you through the configuration of gcloud. You must sign in to continue. Would you like to sign in (Y/n)? Y You are signed in as [email@example.com]. Pick cloud project to use: [1] existing-bun-app-1234 [2] Enter a project ID [3] Create a new project Please enter numeric choice or text value (must exactly match list item): 3 Enter a Project ID. my-bun-app Your current project has been set to: [my-bun-app] The Google Cloud CLI is configured and ready to use! 2(Optional) Store your project info in environment variables
Set variables for your project ID and number so they’re easier to reuse in the following steps.terminalCopyPROJECT_ID=$(gcloud projects list --format='value(projectId)' --filter='name="my bun app"') PROJECT_NUMBER=$(gcloud projects list --format='value(projectNumber)' --filter='name="my bun app"') echo $PROJECT_ID $PROJECT_NUMBER Copymy-bun-app-... [PROJECT_NUMBER] 3Link a billing account
List your available billing accounts and link one to your project:terminalCopygcloud billing accounts list CopyACCOUNT_ID NAME OPEN MASTER_ACCOUNT_ID [BILLING_ACCOUNT_ID] My Billing Account True Link your billing account to your project. Replace [BILLING_ACCOUNT_ID] with the ID of your billing account.terminalCopygcloud billing projects link $PROJECT_ID --billing-account=[BILLING_ACCOUNT_ID] CopybillingAccountName: billingAccounts/[BILLING_ACCOUNT_ID] billingEnabled: true name: projects/my-bun-app-.../billingInfo projectId: my-bun-app-... 4Enable APIs and configure IAM roles
Activate the necessary services and grant Cloud Build permissions:terminalCopygcloud services enable run.googleapis.com cloudbuild.googleapis.com gcloud projects add-iam-policy-binding $PROJECT_ID \ --member=serviceAccount:$PROJECT_NUMBER-compute@developer.gserviceaccount.com \ --role=roles/run.builder These commands enable Cloud Run (run.googleapis.com) and Cloud Build (cloudbuild.googleapis.com), which are required for deploying from source. Cloud Run runs your containerized app, while Cloud Build handles building and packaging it.The IAM binding grants the Compute Engine service account ($PROJECT_NUMBER-compute@developer.gserviceaccount.com) permission to build and deploy images on your behalf.5Add a Dockerfile
Create a new Dockerfile in the root of your project. This file contains the instructions to initialize the container, copy your local project files into it, install dependencies, and start the application.DockerfileCopy# Use the official Bun image to run the application FROM oven/bun:latest # Copy the package.json and bun.lock into the container COPY package.json bun.lock ./ # Install the dependencies # Install the dependencies RUN bun install --production --frozen-lockfile # Copy the rest of the application into the container COPY . . # Run the application CMD ["bun", "index.ts"] Make sure that the start command corresponds to your application’s entry point. This can also be CMD ["bun", "run", "start"] if you have a start script in your package.json.This image installs dependencies and runs your app with Bun inside a container. If your app doesn’t have dependencies, you can omit the RUN bun install --production --frozen-lockfile line.Create a new .dockerignore file in the root of your project. This file contains the files and directories that should be excluded from the container image, such as node_modules. This makes your builds faster and smaller:.dockerignoreCopynode_modules Dockerfile* .dockerignore .git .gitignore README.md LICENSE .vscode .env # Any other files or directories you want to exclude 6Deploy your service
Make sure you’re in the directory containing your Dockerfile, then deploy directly from your local source:Update the --region flag to your preferred region. You can also omit this flag to get an interactive prompt to select a region.terminalCopygcloud run deploy my-bun-app --source . --region=us-west1 --allow-unauthenticated CopyDeploying from source requires an Artifact Registry Docker repository to store built containers. A repository named [cloud-run-source-deploy] in region [us-west1] will be created. Do you want to continue (Y/n)? Y Building using Dockerfile and deploying container to Cloud Run service [my-bun-app] in project [my-bun-app-...] region [us-west1] ✓ Building and deploying... Done. ✓ Validating Service... ✓ Uploading sources... ✓ Building Container... Logs are available at [https://console.cloud.google.com/cloud-build/builds...]. ✓ Creating Revision... ✓ Routing traffic... ✓ Setting IAM Policy... Done. Service [my-bun-app] revision [my-bun-app-...] has been deployed and is serving 100 percent of traffic. Service URL: https://my-bun-app-....us-west1.run.app 7Visit your live application
🎉 Your Bun application is now live!Visit the Service URL (https://my-bun-app-....us-west1.run.app) to confirm everything works as expected.Was this page helpful?
YesNoSuggest editsRaise issueDeploy a Bun application on DigitalOceanPreviousInstall TypeScript declarations for BunNext⌘IxgithubdiscordyoutubePowered by智能索引记录
-
2026-03-01 03:06:50
综合导航
成功
标题:快乐的秋游(优秀)
简介:今天秋高气爽,我们乘车来到风景如画的松江欢乐谷。还没到欢乐谷,我已经隐约听见那震耳欲聋的叫声,恍惚看见了那耸入云霄的过山
-
2026-02-27 16:35:16
综合导航
成功
标题:任字的意思_任字的解释、组词、拼音、组词、笔顺、部首-雄安文学网
简介:雄安文学网为您提供【任】字的详细解释,包括【任】组词、拼音、组词、笔顺、部首和笔画,帮助您全面理解和掌握【任】的含义和用
-
2026-02-27 17:50:35
综合导航
成功
标题:Blog PIP - PIP Lynchburg, VA
简介:Track our weekly updates in interesting information with PIP
-
2026-02-28 22:08:51
教育培训
成功
标题:[优选]实用的二年级作文3篇
简介:在学习、工作或生活中,大家都尝试过写作文吧,作文是由文字组成,经过人的思想考虑,通过语言组织来表达一个主题意义的文体。你
-
2026-03-01 05:33:03
综合导航
成功
标题:小学四年级作文4篇[精品]
简介:无论是在学校还是在社会中,大家都跟作文打过交道吧,借助作文人们可以反映客观事物、表达思想感情、传递知识信息。写起作文来就
-
2026-02-27 17:16:20
综合导航
成功
标题:Домен YACHTS: купить доменное имя в зоне YACHTS и зарегистрировать на Рег.ру
简介:Открыта регистрация домена в зоне ✔️ YACHTS! Зарегистрируйте
-
2026-03-01 12:14:18
综合导航
成功
标题:四年级的作文经典【9篇】
简介:在我们平凡的日常里,大家都接触过作文吧,借助作文可以提高我们的语言组织能力。那要怎么写好作文呢?下面是小编帮大家整理的四
-
2026-03-01 11:31:27
综合导航
成功
标题:Digital Employee Experience (DEX) Software Solution - 1E
简介:Fix digital workplace issues fast and forever. IT automation
-
2026-02-27 17:34:12
游戏娱乐
成功
标题:NCSOFT - 充满欢乐的新世界
简介:从Lineage、AION、劍靈、THRONE AND LIBERTY等MMORPG,到休闲、射击、动作游戏,让丰富的乐
-
2026-02-27 17:57:48
综合导航
成功
标题:GQR Innovative Talent Solutions for Strategic Growth · GQR
简介:Discover GQR
-
2026-02-28 22:01:52
综合导航
成功
标题:ISG job portal - Code of Conduct
简介:Code of Conduct. ISG Personalmanagement GmbH commits itself
-
2026-03-01 23:55:06
图片素材
成功
标题:废柴的作文2000字 描写废柴的作文 关于废柴的作文-作文网
简介:作文网精选关于废柴的2000字作文,包含废柴的作文素材,关于废柴的作文题目,以废柴为话题的2000字作文大全,作文网原创
-
2026-03-01 03:36:32
综合导航
成功
标题:机会永远眷顾着见识多的人-励志一生
简介:作者:孙晴悦 1 看到这么一句话,深以为然,一个雄心勃勃的年轻人并不稀罕,稀罕的是终身战士。很多人的血从未热过,而他们的
-
2026-03-01 23:40:36
综合导航
成功
标题:Mechanical Contractor Software Track Labor, Equipment & Payroll
简介:Manage labor hours, bill equipment usage, and automate payro
-
2026-03-01 12:08:13
教育培训
成功
标题:精选五年级作文集合8篇
简介:在日常学习、工作和生活中,大家都经常看到作文的身影吧,作文是经过人的思想考虑和语言组织,通过文字来表达一个主题意义的记叙
-
2026-03-01 09:28:40
图片素材
成功
标题:不只的作文 描写不只的作文 关于不只的作文 素材-作文网
简介:作文网精选关于不只的作文,包含不只的作文素材,关于不只的作文题目,以不只为话题的作文大全,作文网原创名师点评,欢迎投稿!
-
2026-02-28 22:16:04
综合导航
成功
标题:Helenius, Firkus, Nadeau shine at AHL All-Star Skills Competition NHL.com
简介:Top NHL prospects showcase high-end abilities but know key t
-
2026-03-01 16:18:05
综合导航
成功
标题:MWC - The Largest And Most Influential Connectivity… MWC Barcelona
简介:Join the mobile technology ecosystem at the largest and most
-
2026-03-01 05:36:43
教育培训
成功
标题:我爱芒果作文2篇
简介:在学习、工作或生活中,大家总少不了接触作文吧,借助作文可以提高我们的语言组织能力。作文的注意事项有许多,你确定会写吗?以
-
2026-02-28 22:21:13
综合导航
成功
标题:デジタル戦略コンサルティング EY Japan
简介:EY-Parthenonのデジタル戦略コンサルティングチームは、ビジネストランスフォーメーションを加速させる上で効果的か
-
2026-03-01 15:46:02
综合导航
成功
标题:经典语录:心中有暖,又何惧人生荒凉-励志一生
简介:经典语录:心中有暖,又何惧人生荒凉_经典语录:心中有暖,又何惧人生荒凉 1、纸短情长,你最难忘。 2、年龄越大越要学
-
2026-02-27 17:28:05
综合导航
成功
标题:Compatible avec MAHLE AKO - VTE-FILTER GmbH
简介:Original VTE - compatible avec Mahle AKO
-
2026-03-01 11:49:32
教育培训
成功
标题:亲情难忘作文
简介:在学习、工作或生活中,大家都经常看到作文的身影吧,通过作文可以把我们那些零零散散的思想,聚集在一块。那要怎么写好作文呢?
-
2026-02-28 11:48:14
综合导航
成功
标题:property keepAlive Node.js net module Bun
简介:API documentation for property node:net.TcpNetConnectOpts.ke
-
2026-03-01 03:31:43
综合导航
成功
标题:童年趣事作文
简介:无论是在学校还是在社会中,大家都经常看到作文的身影吧,通过作文可以把我们那些零零散散的思想,聚集在一块。相信很多朋友都对
-
2026-02-27 16:04:17
综合导航
成功
标题:Blog 1000 - Sumir Karayi looks back at 17 years of 1E
简介:To mark the milestone of our 1000th blog, Sumir Karayi CEO l
-
2026-03-01 03:39:15
综合导航
成功
标题:How much bandwidth utilization is considered insufficient for a cloud server?-DNS.COM
简介:In today
-
2026-02-27 17:08:47
综合导航
成功
标题:494015138-1150 Heater Jacket
简介:The 494015138-1150 PTFE-Teflon® Heater Jacket is designed fo
-
2026-02-28 22:08:37
综合导航
成功
标题:10 big-name players that didn't make PFF's Top 101
简介:Sam Monson explains why players like Patrick Peterson and Le
-
2026-02-27 16:40:20
综合导航
成功
标题:Faith Homepage CBN
简介:The Christian Broadcasting Network is a global ministry comm