Date: 2024.10.16 | cloud | coolify | create | docker | hosting | tech |
DISCLOSURE: If you buy through affiliate links, I may earn a small commission. (disclosures)
I've been using Coolify the past few weeks to transition several of my side project sites to a VPS - both as an experiment and cost-cutting (and capping) measure.
In this screen cast I walk through setting up my newest project One Million Checkboxes on my VPS.
Create new Deploy Key (SSH)
Keys and TokensAddDATE_deploy-APPNAME)Configure GitHub repo to allow you to deploy from it
Settings -> Deploy keysAdd deploy keyAdd KeyCreate your app on Coolify
Dashboard -> ProjectsNew -> Private Repository (with Deploy Key)Repository Url with git@... from your GitHub Repo (IME this works better than https)BuildPack = DockerfileBranch = main / master / whateverDeploy your App
Setup Autodeploys from GitHub on branch push:
Webhooks sectionSettings -> WebhooksAdd WebhookPayload URL = the url in CoolifySecret = The webhook password you just madeActiveAdd webhookThere's bound to be some configuration stuff that your app needs to deploy.
Here are some I've needed to set myself:
can't open '/artifacts/h80448k08g00c4oggg84c4cc/Dockerfile': No such file or directory
I build my apps like monorepos so my Dockerfile can't be found in the root directory.
To fix:
ConfigurationBuild sectionBase Directory to where my Dockerfile lives - for me that's /AppSave to save the configurationDeploy to deploy with the new settingsURL gives Bad Gateway
For me this usually happens when my app is running fine but it's looking at the wrong port.
By default Coolify seems to point incoming traffic to port 3000 but my apps usually listen on 8080.
To fix:
ConfigurationNetwork sectionPorts Exposes to the port you have - for me it's 8080Save to save the configurationRedeploy to deploy with the new configOverall I've enjoyed using Coolify but it does have some rough edges as it's new and built by a solodev.
Let me know if you like this kind of post / want more on this topic and I'll make more guides.
If you liked this post you might also like:
The best way to support my work is to like / comment / share for the algorithm and subscribe for future updates.