Skip to content

Commit

Permalink
fix: polish (#35)
Browse files Browse the repository at this point in the history
Co-authored-by: Yi Zhou <yizhou1@WKMZT333F147.global.publicisgroupe.net>
  • Loading branch information
B-sirius and Yi Zhou authored May 24, 2024
1 parent 714a2a8 commit 4d4363d
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description: 本地应用如何部署线上,docker如何帮你解放双手,

本文将一步步的带你部署一个包含独立前后端的完整应用到**Azure**,希望可以帮助你理解部署应用到线上的大致思路。

本文所涉及的应用以及workflow的源代码:https://github.com/B-sirius/fullstack-demo
本文所涉及的应用以及workflow的源代码:(fullstack-demo)[https://github.com/B-sirius/fullstack-demo]

## 主角登场

Expand All @@ -32,7 +32,6 @@ description: 本地应用如何部署线上,docker如何帮你解放双手,
- 云服务:Azure
- App Service
- 数据库服务:Azure Database for PostgreSQL flexible server
- ~~应用网关:Application Gateway~~(这个服务对于demo来说太贵了,在底部会贴一个教程链接,本文只会用Nginx去做简单的反向代理)

好,停一下,看到这里其实不难看出此次教程的大致思路,让我拉一张图给你感受一下:

Expand Down Expand Up @@ -152,7 +151,7 @@ postgres:
1. **设置环境变量`DATABASE_URL`**,让服务端能够访问数据库
2. **使用Prisma Migrate数据库**,否则本地数据库将无法同步我们的服务端将要访问的database,tables等等

完整的步骤可以参考示例代码的[README](https://github.com/B-sirius/test-fullstack?tab=readme-ov-file#local-setup)。
完整的步骤可以参考示例代码的[README](https://github.com/B-sirius/fullstack-demo?tab=readme-ov-file#local-setup)。

### 总结

Expand Down Expand Up @@ -235,8 +234,8 @@ jobs:

这里用到了两个docker官方action,具体使用方法可以参考它们的文档

- https://github.com/docker/login-action/tree/v3
- https://github.com/docker/build-push-action/tree/v5
- (docker/login-action)[https://github.com/docker/login-action/tree/v3]
- (docker/build-push-action)[https://github.com/docker/build-push-action/tree/v5]

如果workflow可以成功跑起来,你应该能在docker hub中看见自己的image

Expand Down Expand Up @@ -316,7 +315,7 @@ jobs:
images: "index.docker.io/${{ vars.CLIENT_IMAGE }}:latest"
```

这里用到了一个Azure的官方action:https://github.com/Azure/webapps-deploy/tree/v2,可以直接把对应的image部署到你指定的azure app service。
这里用到了一个Azure的官方action:(Azure/webapps-deploy)[https://github.com/Azure/webapps-deploy/tree/v2],可以直接把对应的image部署到你指定的azure app service。

试着运行下你的workflow,如果成功的话,刷新Azure后你应该能看到`Container Image`变为了你自己的Image:

Expand Down

0 comments on commit 4d4363d

Please sign in to comment.