Docker Compose on Ubuntu 26.04 for Web Applications
Docker Compose on Ubuntu 26.04 for Web Applications
Docker Compose on Ubuntu 26.04 for Web Applications
Docker Compose on Ubuntu 26.04 for Web Applications

Docker Compose on Ubuntu 26.04 for Web Applications

v. 1.0.0 · Last updated: 2026-10-04

by Carles Mateo

English Technical books Docker Java PHP Python Symfony Ubuntu Web Development Docker Java PHP Python Software Development Sprint Bot Symfony 7.4 Ubuntu 26.04
Learn to create Docker Containers using Docker Compose for Web projects using Symfony 7.4 / PHP 8.5, Spring Boot 4.2 / Java 25, Django 6.1 / Python 3.14, WordPress and Drupal behind Traefik with HTTPS, MySQL 8.4, cron jobs in containers, workers, hardening and zero-downtime updates

This book shows how to run web applications in production with Docker Compose on one Ubuntu 26.04 LTS server. It starts with a clean server and ends with five applications. They are built with four different technologies, sit behind one HTTPS reverse proxy, and include scheduled jobs, background workers, a hardened configuration and updates without downtime.

Every command, file and screenshot in the book was run and captured on a real Ubuntu 26.04 machine. The files are the ones in the example code, and nothing was typed from memory. When something did not work the first time, the book says so, in boxes marked Tested in the lab, together with the fix.

  • What containers, images, volumes and networks are, and what Docker Compose adds on top of them.
  • How to install Docker Engine and the Compose plugin on Ubuntu 26.04 from Docker's own repository, and how to configure the daemon for a server.
  • How to write compose.yaml files you can read a year later, using services, builds, healthchecks, dependencies, profiles, override files and .env files.
  • How to put a single Traefik reverse proxy in front of everything, with HTTPS from Let's Encrypt or from your own certificate authority.
  • How to run MySQL 8.4 in Compose safely, and how to back it up.
  • How to package and deploy three custom applications:
    • a Symfony 7.4 application on PHP 8.5 (PHP-FPM + nginx);
    • a Spring Boot 4.2 application on Java 25;
    • a Django 6.1 application on Python 3.14 (gunicorn).
  • How to deploy WordPress 7.1 and Drupal 11.4 from their official images, managed with WP-CLI and Drush.
  • How to run cron jobs with containers, using five patterns, each tested in practice: supercronic, a classic cron daemon in a container, the host's cron with docker compose exec or with docker compose run --rm, and schedulers inside the application.
  • How to run background workers (Symfony Messenger, Celery with Redis) and scale them.
  • How to harden a Compose deployment: limits, read-only containers, dropped capabilities, secrets, the ufw trap with published ports, and image scanning.
  • How to update without downtime, how to roll back, and how to start everything when the server boots.

The book is for system administrators, DevOps engineers and developers who already use Linux on the command line and want to deploy web applications on their own servers: a virtual machine at a cloud provider, a dedicated server or a machine in the office. You do not need to know Docker. You do need to be comfortable with ssh, sudo, a text editor and the basics of HTTP.

You do not need to know PHP, Java or Python either. The applications are small and every file shown is explained. What matters is how they are packaged and run, not how they are programmed.

137 pages (A4)
Attachments
  • Source code and Docker Containers lab creation scripts (120.2 KB)
€25