Skip to content

Having issues getting Habitica to work with Docker on Arch #27

@Runo888

Description

@Runo888

Apologies if asking for troubleshooting is inappropriate here, but I've been having a lot of trouble gettting this stuff set up.

I've tried to work with Docker a few times in the past, but I remember each time not wanting to touch it anymore. I decided to install Docker Desktop on my fresh Arch installation (yada yada superiority complex) that I've been tinkering with since self-hosting Habitica seems cool to me and I'd like to spend time trying to get my own stuff hosted online.

First I got my hands on MongoDB by using yay -S mongodb-bin. I think that went okay, nothing that really stood out there. I'm running nginx as a reverse proxy so I made some modifications to nginx.conf in advance on my computer (not that it mattered for the issue I'm having but just saying it anyways so you have some context).

Next up I git cloned the repository to my computer. Afterwards I installed Docker Desktop by running wget https://download.docker.com/linux/static/stable/x86_64/docker-28.5.2.tgz -q0- | tar xvfz - docker/docker --strip-components=1 and then sudo cp -rp ./docker /usr/local/bin/ && rm -r ./docker. Again I don't see any issues here yet. I was supposed to go download one of Docker's releases from their website (version 4.50.0) and then installed the downloaded .pkg.tar.zst file by running sudo pacman -U ./docker-desktop-x86_64.pkg.tar.zst Again no problems here and after the installation I had a working Docker Desktop on my machine.

Initially I changed the BASE_URL line in the docker-compose.yml to be http://127.0.0.1:3000 instead of letting it use port 8080. Not sure if that mattered but after rebuilding the image with the default settings it didn't work either.

Now for the part that puzzles me. I'm meant to run docker build -t habitica . after cding into the cloned repository. This seems to work, I'm getting an image from it no problem.

When I try to run the image it gives me a bunch of options including naming the container (which doesn't really matter I guess) and up to four ports to define. I don't know what I'm meant to change these ports to, I'm guessing they should be taking care of themselves, but when I have the image running in a container I still can't access it in my browser.

I tried localhost:80, I tried localhost:3000, I tried localhost:8080, I tried setting the ports to random ports and using those with no success. What's going on? Did I miss a step? Again I hardly touch Docker, the other servers that I've got running on my machine just run directly on it and both use nginx as a reverse proxy with no problem. This one I can't even access on my local network.

Tried some quick troubleshooting over the web as well but no dice. I'd probably have to study Docker inside and out before I'd catch on to what I did wrong. Figure I might as well ask the people who are already experienced with it.

Thanks, and again I hope this isn't the wrong place to ask.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions