I’ve been self-hosting a number of apps in Docker for my own personal use for some time. Things like Immich and Jellyfin and AudioBookshelf are easy to set up and require very little maintenance. This is part of my de-googling process and I’ve been super happy with those apps. This week I realized I don’t have a tool like Postman for API testing, so I assigned myself some homework: Create a new minimal app I can use to test APIs, and make it available on my litle NUC 10 home server. Here are the steps I followed to do all of that. I think I’ve spent something like 2.5 hours total, so this was really worth the effort, IMO.
Fire up the DuckDuckGO AI chatbot and ask it for advice on how to create this app.
Chat back and forth for a while until I settle on this architecture:
Follow the AI bot’s instructions to create these two files in “src” folder:
That’s it, that’s the whole app!
Test that locally on 127.0.0.1 and it works.
More back and forth until I get the app doing basic HTTP/S calls and displaying their responses on the same page, via some very simple JavaScript.
Add in bootstrap and adjust the CSS to make it look nice, and the app is done (for now).
Commit the whole project to my local ForgeJo git server (another self-hosted app, because I don’t cotton to any Microsoft BS either) and that’s Phase 1.
Now I can run the app on my server with something like, “python3 server.py” and boom, I can access that from my PC and my Phone and it looks great!
Sweet!!!
Next, I wanted to move that app from running directly on my PC, to running in a Docker container, like all of the other apps on my server. That turns out to be pretty simple as well.
# syntax=docker/dockerfile:1
FROM python:3.13.7-trixie
WORKDIR /app
COPY . .
RUN apt-get update
RUN pip install bottle
RUN pip install requests
ENTRYPOINT /bin/bash -c "python3 src/server.py"
EXPOSE 8111
That tells Docker to:
Docker needs to build that into a Container so this is the command to make that happen:
docker build -t mundane-api .
docker run -d -p 0.0.0.0:8111:8111 mundane-api
My last step was just converting that Docker “run” command into a Docker Compose file, so I can now maintain and monitor the Docker app from my local Dockge app. (Dockge is great once you are running more than a couple of apps in Docker. I should do a separate post about all of its great features soon…)
services:
mundane-api:
ports:
- 0.0.0.0:8111:8111
image: mundane-api
networks: {}
I save all of these files into a new folder in the same place I keep all of my Docker “stacks” and boom - Docgke is montoring the app for me now.
And I’m done! I will work on updates for the app next but this was really fun to learn and get running and really, not tooooo difficult. It helped that my little API testing app didn’t have any storage to worry about and just has that one main page for the UI.
Till next time… :)