cho.sh
Migrating Project Aldehyde to FlightControl (February 24誠鉉)

Migrating Project Aldehyde to FlightControl (February 24誠鉉)

Warning

Over a year old. May be outdated

I migrated my website, (part of Project ), to FlightControl.

4AEADB

I love their Spaceship themes! You get a random spaceship for every project you create..

Background

Before , the workflow was simple -- git push, wait 10 minutes for Vercel to build it, voila, updated website.

As grew to thousands of documents and images, RAM usage started to spike. In January 2023, got too big to fit inside a Vercel builder. More in .

I have had to change my workflow to build it locally and push it to Cloudflare workers. While this workflow worked, I had to wait 20 minutes for it to build and 5 minutes to deploy. Sometimes wrangler would fail on a specific network. Sometimes the build would never finish and I had to keep the program running forever. Not a delightful experience. Finally, the cache control seemed slightly awkward. A full JS-CSS redownload happens whenever I deploy my website. As far as I know, docusaurus has its internal hash output generator, but seemed to override it. I haven't investigated more, but I noticed far more flashing repaints on . (AWS CloudFront had far fewer repaints and seemed to cache correctly.)

After getting a positive first impression on FlightControl, I naturally moved some of my projects off from Vercel and . The best part was that I paid the AWS fees, and thus, I didn't need to worry about exceeding the build limit (in either time or space). Is the building taking longer? I can pay more. Does the build takes too much RAM? Change the CodeBuild instance to a higher one. Problems that can be solved with money are the most straightforward. Unfortunately, Vercel or Cloudflare does not allow me to pay for more build time or RAM.

Finally, ever since , I had $$$ of AWS credits I needed to use in the next two years, but AWS DX is a pain compared to more modern solutions like Vercel or ... and I didn't want to spend weeks of dev-hours just trying to configure EC2s. But also, at the same time, I didn't want to let go of all these valuable credits... so I was in this checkmated position, but FlightControl came to rescue me.

Anyways.

Configuring AWS Fargate Dockerfiles

FlightControl's AWS Fargate are provisioned with Dockerfiles, so I had to write some dockerfiles to make sure they build correctly. I used a jankily frankensteined pipe of and Node to generate my website (duh, I know) and needed a Dockerfile instead of using just Nixfiles.

docker
FROM node:latest
RUN apt-get update && apt-get install -y python3
RUN npm install -g pnpm
WORKDIR /usr/src/app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install
COPY . .
RUN pnpm all-in-one:build
EXPOSE 3000
CMD ["pnpm", "serve"]

Bumping up AWS CodeBuild size

As seen in , weirdly, Docusaurus chugged more memory than Chrome, and I needed a bigger code builder. I didn't want to make the AWS Fargate instance itself bigger because that would waste money when I wouldn't need that processing power for 99% of the runtimes. Luckily, there was a very straightforward way to bump only the builder. This is one of the most incredible benefits of working on top of AWS. Everything is already there.

Configuring Root Domain

FlightControl Docs only mentioned they only supported with the ALIAS keyword. Thus, there was no way to configure the root domain because does not support the ALIAS keyword.

But it was indeed possible! Using CNAME-flattening on , I was able to configure the root domain directly to (or AWS, under the hood?). More here: . I reported this to FlightControl, and they responded:

E68961

Original Response

40C34D

After sharing my so-called "workaround"

As I noted, this is the charm of working with an early-stage engineering product team! You also contribute to the product as an early adopter.

Special thanks to the top-notch customer support

Along the way, the Developer Support was excellent. Replies within 2 hours. I heard they were a tiny team now. I hope they don't get Vercelized, where their indie hacker dev support worsens daily.

Conclusion

I'll slowly move toward all my hobbies or work-related stuff to FlightControl. I found a hidden gem. I am willing to pay for a Prosumer plan (like GitHub), but I am delighted with their permissive and generous free plan.

25D46A

Backlinks2