Back
Similar todos
Started learning Dokku / trying to set it up with Digital Ocean. ty @ben ... joined the dokku discord; went through this guide: dokku.com/docs/getting-starte… ; switched my whatdo domain in DigitalOcean to point to the new dokku droplet ; asked for help in the forum to understand what it means for "the web UI [to be] submitted": github.com/dokku/dokku/discus… ; I think it's referring to the DO UI for creating the new droplet ; next step for tomorrow: go through this guide: dokku.com/docs/deployment/app…
Set up Dokku! Loving the way this works so far! #interviewpr
Continuing to try to get Dokku working with a monorepo; I think I got past my last problem of how to deploy both apps by running on the server `dokku builder:set backend-app build-dir backend` (and similar for the frontend); now I'm seeing a new error when I try to deploy the frontend app: `Two different lockfiles found: package-lock.json and yarn.lock`; I seemed to fix it by deleting the yarn.lock. New error: "Missing script: start"; fixed that by adding a 'start' entry to my package.json. New error: "Cannot find module '@vitejs/plugin-vue'"; maybe because it's listed as a devDependency? I found this SO post where the guy said he ended up just putting his frontend on Netlify, so maybe I'll try that instead: stackoverflow.com/a/62455021/… ChatGPT is saying the way to do it is to deploy my API at api.mydomain.com and then direct traffic at other subdomains to Netlify to handle frontend requests. So I'll try that tomorrow.
Continuing to look into the CORS error I'm getting when my frontend tries to make an API request to my backend; it seems my backend dokku app wasn't deployed for some reason; destroyed my existing go dokku app and recreated it and then struggled with an error for a while before realizing I had the same issue a few days ago and the solution was to run `dokku builder:set backend-app build-dir backend`; now getting an error saying the download for my specified version of Go is "unknown to the buildpack"; after much trial-and-error I realized the problem was that Dokku has a stupid error message that makes it sound like it has already automatically chosen a Go buildpack when in fact it has not. I was additionally getting confused because I was seeing Dokku installing Go and not realizing that was because of my +heroku instruction in my go.mod file rather than Dokku automatically using a Go buildpack. The solution was to specify a Go buildpack for my app with `dokku buildpacks:add <my-app> heroku/go`. Now getting a new error: "Failed to connect to database". Fixed it by switching my code to use the `DATABASE_URL` environment variable that Dokku creates for your code to connect to the db. My `git push dokku main` finally succeeded, but I'm still getting a CORS error. Eventually figured out it was because my Dokku app name was `whatdo-backend` when I had forgotten that that would also be the name of the subdomain, so I had to delete the app and recreate it with the name `api`. I also created a `/ping` health-check URL to help me debug this more quickly. I'm now getting a 521 error, I think maybe because Dokku is running on http and Cloudflare is reaching out via https?
Went through my Google Tasks notes-to-myself of stuff it would be cool to make, turned my favorites into Jira projects, and removed them from Google Tasks. Next: pick one and try to come up with a summary of how an MVP could work. Removed links from WhatDo homepage for projects that don't exist (yet). Feeling super happy I set up Netlify / Dokku now that I can just push and have my changes immediately live. Spent time drafting an email to ask a YouTuber if I can do a video with him, I'm on the fence about whether I should do it.
Self host frontend
- Setup Dokku app with documentation
- Migrate deployment to Dokku app
- Setup CI to automatically deploy on Dokku
- Update DNS
#treasure
Continuing to try to get my dokku API to work, looking into an `ERR_CONNECTION_REFUSED` error. I posted for help on the dokku github: github.com/dokku/dokku/issues… I suspect the issue may be caused by my not having SSL set up but I'm not sure. I can't even find the logs where the refused connection is being logged.
Tried out dokku as a deployment option.. too much work #magicheader
Fix Dokku deploy #stenograph
Finally got the Dokku Ruby on Rails example app working 😭 Apparently I just needed to reboot the droplet? `curl` to my droplet's IP wasn't working, `dokku ports:list ruby-getting-started` didn't show it listening on port 80, `dokku ports:add ruby-getting-started http:80:5000` resulted in an error saying nginx wasn't running. Rebooting seemed to fix it. Next up is trying to deploy my Go backend with Dokku. Destroyed the ruby demo dokku app. Resized my DO droplet to the $6/mo one.
setup dokku and test how it works
Finish my initial test of self-hosted PaaS solutions and post about it on X: x.com/ben_makes_stuff/status/…
Next up: moving #unblockdomains to Dokku as a test and blogging about it !private
Only got ~5hrs of sleep after two double espressos yesterday, so I took a Lycopene capsule...signed up for a LinkedIn Premium free trial so I could send a message to a Kasikorn backend engineer to ask why users can't export their transaction history in CSV format...removed the 'Blog' link on nw.com b/c I don't have the WordPress blog up and I never really used the blog that much, added a link to my email address instead so people can contact me...started going through the Kasikorn API "Slip Verification" challenges...got the first one done...the second one requires I have SSL set up on my domain and not through Cloudflare...discovered while doing that that my whatdo site is returning a 404 if I try to sign in...got GoLand's db tool connecting to the digital ocean postgres db b/c I noticed that wasn't set up yet...install postgres on my macbook b/c something got messed up and somehow it seemed to not be installed...got all the db problems fixed, don't know how that happened...now having a CORS issue when running locally, all this stuff was working, IDK how it all broke...ok I remember now, I YOLO'd the backend code and disabled the existing router to get the Line echo bot working...sent an email to another local YouTuber to ask if I can be in a video with him...installed cursor and tried using it for a simple refactor task to get a sense of how it works...figured out a way (thanks to ChatGPT) to get the Line callback handler working while also not breaking the existing routes...went for a massage to give my brain cells some time to recover...used cursor some more and I get the hype, this is really cool, I'm surprised Jetbrains hasn't copied it yet...after a long while I finally got my whatdo backend working properly again (auth + user middleware working), it was a good learning experience with cursor and Go...got a GitHub Action set up so my DO dokku VPS will update when I push to main, so now both frontend and backend will update automatically when I push to GitHub...ending the day on this banger set: www.youtube.com/watch?v=d2340… Tomorrow: I need to bill hours to my client to make $, I want to try to finish the KBank API challenge to see if I can do the Slip Verification, I want to email another YouTuber, if I have any time left over I want to keep going with that Line/ChatGPT bot and try to make a frontend interface for it.
Hit an error when trying to deploy the dokku app, I think it's because I have both a frontend dir and a backend dir in my repo. I think the next step is to try to follow the example of this github repo to deploy two separate dokku apps: github.com/abulte/dokku-simpl…
get dokku app up-and-running with help from @daniellockyer #pushmore