How to Use Environment Variables in Docker Compose
Use environment variables in Docker Compose the right way: the .env file, variable substitution, environment vs env_file, and keeping secrets out of git.
8 guides
Use environment variables in Docker Compose the right way: the .env file, variable substitution, environment vs env_file, and keeping secrets out of git.
What no, always, unless-stopped, and on-failure actually do in Docker. How each handles crashes, reboots, and manual stops, plus the gotchas that catch people.
A line-by-line walkthrough of a real docker-compose.yml file: services, image, ports, volumes, environment, depends_on, networks, and the top-level keys.
Pillar Guide
Understand Docker networking: bridge vs host vs none, default vs user-defined bridges, container DNS by name, publishing ports, and Compose networks.
Run WordPress with Docker Compose: a working wordpress + MySQL stack with named volumes for persistence, env vars, ports, a reverse proxy note, and backups.
Set up an Nginx reverse proxy with Docker Compose: route multiple apps on one host, configure proxy_pass, use Docker networks, and add TLS.
Pillar Guide
Install Docker on Ubuntu Server 22.04, 24.04 or 26.04 LTS, or 26.10: add the official apt repo and GPG key, install docker-ce and Compose, and verify it.
Pillar Guide
Learn Docker Compose from scratch: write one YAML file to run multiple containers, with a working WordPress + MySQL example and the core up/down commands.