Migrating Project Aldehyde to FlightControl (February 24誠鉉)

Migrating Project Aldehyde to FlightControl (February 24誠鉉)

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 for 10 minutes for to build it, and then voila you have the updated website.

As grew, with thousands of documents and images, the RAM usage started to spike. Then, on January 2023, became too big to fit inside a builder. More information on .

I have had to change my workflow to build it locally and push it to . 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. In the end, it was not a delightful experience. Finally, the cache control seemed slightly awkward; a full - redownload happens whenever I deploy my website. As far as I know, has its internal hash output generator, but seemed to override it. I haven't investigated more, but I noticed far more flashing repaints on . (Long story short, AWS CloudFront had far fewer repaints and seemed to cache things correctly)

After getting a positive first impression on FlightControl, I naturally moved some of my projects off from and . The best part was that I paid the 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 credits I needed to use in the next two years, but is a pain compared to more modern solutions like 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 Dockerfiles

FlightControl's 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 size

As seen in , weirdly, chugged more memory than , and I needed a bigger code builder. I didn't want to make the 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 ; 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 , under the hood?). More info here: . I reported this information 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 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 ), but I am delighted with their permissive and generous free plan.

25D46A

Backlinks1