跳到主要内容
Fully Booked Docker topology and Cloudflare DNS

Fully Booked - Docker 化部署,使用 DigitalOcean 和 Cloudflare

fully booked brand logoFully BookedDevOps 工程4月 24, 2023 - 6月 24, 20252 年 3 个月

Fully Booked 以五个 Docker 服务的形式上线,部署在 Cloudflare 后面的一台 DigitalOcean droplet 上,让一个很小的团队也能运营一个托管定金的市场平台。一个仓库构建所有镜像,一个 compose 文件和一个 Makefile 把发布简化为 pull、build 和 up,Caddy 代理负责证书和安全头,Playwright 在服务器上渲染每一份报价单和发票的 PDF。由于各服务从一开始就相互独立,后来无需重建就迁移到了自托管的 Kubernetes 集群。

DockerDigitalOceanCloudflareDNSSSL CertificatesCaddy
Md Moniruzzaman Image

Md Moniruzzaman

完整故事

这套基础设施让一个收取定金的交易平台,由一个小团队运行五项服务,而且不出意外。

托管定金的交易平台不能宕机

Fully Booked 收取客户的定金,向运营商发放收入,并送达双方都依赖的各种文件。在这里,宕机可不只是不方便:无法付款的客户会去别家预订,打不开报价单的运营商会丢掉这单生意。

整个平台由五项服务组成,包括客户网站、运营商网站、管理后台、文档网站和一个后端,由一个非常小的团队开发和维护。部署方式必须简单到可以手动运行,又稳固到值得信赖。

五项服务,一个代码仓库,一条命令

每项服务都从同一个代码仓库构建为独立的 Docker 镜像。四个网站被构建成轻量的静态服务器,NestJS 后端承载 GraphQL API,MongoDB 和上传的文件则存放在持久化卷上。一个 compose 文件把它们连接到同一个私有网络中,一个 Makefile 把每次发布简化为 pull、build 和 up 三步。

Brand colour backdrop
The Docker era production topology drawn from the compose file: Cloudflare, one droplet, Caddy, four sites, the backend, MongoDB and file volumes

Cloudflare 在前,外加两个刻意的例外

Cloudflare 托管每个子域名的 DNS,并为公开网站提供代理,负责缓存、证书和防护。有两条记录特意保持直连:一条是运营商网站,好让 Apple 读取那个让链接直接打开应用的文件;另一条是 API,好让 Square 的支付 webhook 顺利到达而不被拦截。

这两处任何一处出错,要么每份 PDF 里的深度链接都会失效,要么支付无法确认,所以两者都在 DNS 表旁边写明了原因。

Brand colour backdrop
The Cloudflare DNS table from the deployment guide, addresses masked: the API and operator records stay DNS only

承担安全工作的反向代理

位于边缘的 Caddy 容器会自动签发证书、压缩响应、重定向所有 www 地址,为 API 添加 strict transport、frame 和 content type 等安全头,并以应用商店要求的 content type 提供应用关联文件。

Brand colour backdrop
The Caddy edge rules: one host per service, association files as JSON, security headers on the API, www redirects

在生产环境中生成文件

每一份报价单、取消信函、发票、预订确认函和司机行程单,都由运行在后端镜像中的 Playwright 在服务器端生成。让无头浏览器在生产容器里成功安装,是整个项目中最难的一环,也正因如此,运营商才能在几秒钟内用手机发出一份精美的 PDF。

Brand colour backdrop
A quotation rendered on the server
An invoice rendered on the server
A driver trip sheet rendered on the server

从一台服务器到一个集群

在最初的几个阶段,这台 droplet 服务器支撑起了整个平台。当每月账单和单台机器的局限开始显现时,同样的镜像被零停机迁移到自托管的 Kubernetes 集群,之所以能做到,是因为它们从一开始就是作为独立服务构建的。

对创始人来说,这意味着无需重建、没有中断;对运营商和客户来说,一切照旧,只是系统一直稳定运行。这些服务本身的故事,请见Fully Booked 的完整故事。

他们的评价

Dominic Dormer

Fully Booked 的 创始人

3 年 7 个月

Excellent time keeping, great attitude, brilliant skill. highly recommend

12月 05, 2024

(5.0)

Darren Cromer

Fully Booked 在 总监

3 年 7 个月

Monir is an exceptional developer with outstanding expertise in his field. His advanced skills enable him to deliver results that surpass those of competitors. He is very thorough and has keen attention to detail, Monir is an excellent listener who can transform your ideas into reality with precision.

11月 28, 2024

(5.0)

Dominic Dormer

Fully Booked 的 创始人

3 年 7 个月

Today marks one year of working with Monir, and this time has allowed me to know Monir as a truly dedicated individual. We have collaborated on my project daily for the past year, and not once has Monir failed to respond. Monir has invested tremendous effort and focus into this project, working late nights and early mornings, always available to answer calls and resolve issues. There has never been a moment when Monir turned down work or shirked responsibility. The project is growing day by day, and if it becomes a success, it will be largely thanks to Monir's unwavering dedication.

7月 03, 2024

(5.0)

Dominic Dormer

Fully Booked 的 创始人

3 年 7 个月

I cannot express enough gratitude for Monir's exceptional work as a full-stack developer. Over the past 8 months, Monir has been instrumental in bringing my vision to life by diligently crafting a sophisticated platform that exceeds all expectations. Monir's proficiency in his craft is unparalleled. His technical expertise, coupled with his creative problem-solving skills, has consistently resulted in innovative solutions that have elevated our platform to new heights. His ability to seamlessly navigate through complex challenges showcases his mastery of both front-end and back-end development. Beyond his technical prowess, Monir's professionalism and dedication are truly commendable. He has demonstrated unwavering commitment and reliability throughout the entire development process, ensuring that every aspect of the platform is meticulously crafted to perfection. Working with Monir has been an absolute pleasure. His clear communication, attention to detail, and proactive approach have made collaboration effortless and enjoyable. He has not only met deadlines consistently but has also gone above and beyond to deliver features that surpass expectations. In conclusion, Monir is not just a developer; he is a visionary who brings passion, expertise, and dedication to every project he undertakes. I am immensely grateful for his invaluable contributions to our platform, and I wholeheartedly recommend him to anyone seeking a top-tier full-stack developer. Thank you, Monir, for your outstanding work and unwavering commitment to excellence. You are truly a standout talent in your field.

3月 27, 2024

(5.0)

Dominic Dormer

Fully Booked 的 创始人

3 年 7 个月

Monir is a very experienced developer. I have been working with him very closely for 8 months now. He has achieved every goal that we planned. He has taken on very complex challenges with the project that we have created and has been able to solve every issue that we've faced. He is extremely hard working. He works day and night. He's work ethic is excellent. He never complains or give excuses. My project is beautiful now and I can't wait to promote it to the world.

1月 21, 2024

(5.0)

Dominic Dormer

Fully Booked 的 创始人

3 年 7 个月

Monir has been working on my project for the last 3-4 months. We have been speaking and creating ideas to improve this project on a daily basis. The project is now complete and I can honestly say Monir is one of the best people I've ever worked with. Every single commitment that Monir promised from the beginning of this journey he stuck to and achieved. He never moaned, complained or made an excuse about anything. He completed every single commitment that we agreed upon. Monir worked early mornings and late nights until he produce the project I asked of him, and now my business journey is ready to move forward and I'm completely glad that I choose Monir to create this platform for me. The project consisted of an admin panel a customer website and an app. All projects were built to high specification and have very sophisticated features. I would definitely recommend monir to anyone looking for a serious developer.

10月 18, 2023

(5.0)

你可能也喜欢

fully booked brand logo
Fully Booked Video Editing
附加服务
2 年 3 个月
fully booked brand logo

Fully Booked:推广和教程视频制作

一支推广视频,按照英国小巴运营商最关心的顺序,带他们了解 Fully Booked 的好处,用的是真实应用而不是素材库画面。视频从运营商自己的问题开篇,每项好处都在真实界面上占一个节拍,并剪成多种时长,从社交信息流上几秒钟的开场钩子,到用于落地页和应用商店页面的完整版本。

Md Moniruzzaman Image

Md Moniruzzaman

6月 24, 2025

+1
Dominic Dormer
fully booked brand logo

Fully Booked:零停机迁移到自托管 Kubernetes

Fully Booked 此前运行在托管云基础设施上,账单逐月上涨,整套技术栈也无人真正拥有。我们把整个平台迁移到自托管的 Kubernetes 集群,全程没有让用户经历一分钟的停机。切换覆盖 DNS、入口网关、数据库和发布流水线,并分阶段推进:只有当某一层在新集群上得到验证之后,流量才会转移过去。那一周使用这款应用的人都没有察觉发生了什么,而这正是目标所在。每月的账单变成了自有硬件,如今同一个集群还承载着平台每周的版本发布。

Md Moniruzzaman Image

Md Moniruzzaman

6月 23, 2026

+1
Dominic Dormer
fully booked brand logo
Fully Booked Photoshop Design
附加服务
2 年 3 个月
fully booked brand logo

Fully Booked:使用 Photoshop 的视觉资产设计

商店截图、宣传图、应用图标和邮件插画,都在 Photoshop 中用真实界面制作,让一个年轻的平台在运营商眼中显得成熟可靠。截图在 Apple 和 Google 要求的每种尺寸下用五次滑动讲完整个卖点,每封邮件都以一幅品牌配色的专属插画开头,图标和启动画面上是两只手相握的标志。

Md Moniruzzaman Image

Md Moniruzzaman

6月 24, 2025

+1
Dominic Dormer
Read the Md Moniruzzaman blog

博客是来自生产一线的笔记:架构决策、经受住真实用户考验的 AI 系统、能自己挣回成本的基础设施。写于工作之中,而不是隔岸观火。