What spiega is about
- Knowledge sharing
- Portfolio
admin tools
admin tool
Collection of powerful admin tools easy to deploy.
docker
I mainly use docker to deploy services since it is easy to test the container before sending it in production. Recently is more and more common to have different architectures and while some years ago was common to run everything on intel now compatibility with ARM, AMD and apple chips needs to be proved. The work moves from writing code to set up configuration and although the work doesn't require much development requires a lot of testing and performance profiling. All projects have a dedicated folder for the deployment of that service and the useful configuration files. `docker` and `docker compose` have different logic and different usability and I prefer to distinguish the use. Although the two commands have the same capabilities I prefer to clearly distinguish the use to make the project more readable. The logic I use is the following:
- Dockerfile
- to create the container by loading an image and install libraries. Entry-point most of the time
- docker compose
- to administrate more containers, expose ports and define networks
processes
We can list the active process by simply running the command:
docker ps
| CONTAINER | ID | IMAGE | COMMAND | CREATED | STATUS | PORTS | NAMES | |||||||
| 238f84a80275 | mariadb | docker-entrypoint.s… | 27 | hours | ago | Up | 27 | hours | 3306/tcp | webserver-mysql-1 | ||||
| 703c46dde436 | mcp_server-mcp_server | "sh | /app/run.sh" | 27 | hours | ago | Up | 27 | hours | (healthy) | 8001-8002/tcp | mcp_server-mcp_server-1 | ||
| 1d1da137a3a9 | llama_cpp-llama_cpp | python3 | 3 | days | ago | Up | 3 | days | (unhealthy) | 0.0.0.0:8787->8080/tcp, | [::]:8787->8080/tcp | llama_cpp | ||
| e5600b6f9caf | ollama-ollama | "/bin/ollama | serve" | 9 | days | ago | Up | 3 | days | (healthy) | 127.0.0.1:11434->11434/tcp, | 127.0.0.1:18789->18789/tcp | ollama | |
| 19be80d20501 | webserver-nginx | /docker-entrypoint.… | 10 | days | ago | Up | 27 | hours | 0.0.0.0:80->80/tcp, | [::]:80->80/tcp, | 0.0.0.0:443->443/tcp, | [::]:443->443/tcp | webserver-nginx-1 | |
| d3ad109d615c | certbot/certbot | "/bin/sh | -c | 'trap | ex…" | 2 | weeks | ago | Up | 3 | days | 80/tcp, | 443/tcp | webserver-certbot-1 |
| afd1012b5e4a | webserver-php-app | php | 2 | weeks | ago | Up | 3 | days | webserver-php-app-1 |
And this is the current setup I have running on this laptop
docker network
We can list the active process by simply running the command:
docker network list
| NETWORK | ID | NAME | DRIVER | SCOPE |
| 63db087931ed | bridge | bridge | local | |
| 79eb94f48e06 | host | host | local | |
| 4c78f2856d14 | llama_cpp_default | bridge | local | |
| 1a01f0f0d2f7 | none | null | local | |
| 1bf3ddec6244 | ollama_default | bridge | local | |
| 7d5834e09e3b | webserver-net | bridge | local | |
| 95f40f2ec001 | webserver_webserver-net | bridge | local |
Where webserver-net is where nginx routes the different end-points to the appropriate containers.
nginx
Nginx is a quick a reliable web-server. I used apache in the past but the language was always hard to interpret and traefik which is just a reverse proxy and has limited usage.