8 months ago, I made a GitHub issue on Iana Noda's OnTrack budgeting tool about dockerizing the application. After discussion, nothing happened.

Until now. Yesterday I took a look at my dockerfile and found that the problem my months old dockerfile had was postgresql. I had been trying to expect an out of container one. I tried to get that method working but I couldn't. I decided to just put postgres in the container with the application even though it's considered bad practice.

I got an error that the role “root” did not exist in postgres. The image also didn't have sudo so I had to put it in the image. I probably could apt-get install sudo && sudo -u postgres … && apt-get remove sudo to work though.

I also eventually realized that I can just su postgres -c … instead of installing then removing sudo.

I got postgres running, and now the app throws a 500 error on startup. I'm giving up for today because I've been working on it for ~3 hours. I'll probably post a follow-up soon.

Update 2021-02-18: I never got it working, but someone else did.