What it is
A file describing which containers make up a project (site, database, bot) and how they connect. One command brings everything up, identically on any server.
How we use it
Every studio project is a folder with docker-compose.yml and .env on the server. Moving to another server means copying the folder and running one command.
Where it helps a business
- A project has several parts (a bot, a database, a cache, a web panel), and starting them one by one is slow and risky.
- The server needs to change within an hour, not a week.
- An extra feature should be switched on with a flag without touching the main project.
How we use it
Every studio project is a folder with a docker-compose file and a .env on the server. Moving means copying the folder and running one command.
- Start order. In the IT help desk Compose brings up MariaDB and Redis with health checks, the bot starts only after them, and migrations apply automatically.
- Profiles. In the video downloader bot a local Bot API for files up to 2 GB, the Hi-Res section and a proxy with a Russian exit are switched on as separate profiles.
- Shared files. In ToshaMusic the bot and the local telegram-bot-api see one data directory at the same path; otherwise the server would not find the file.
- Resource ceilings. In Peregovorka every service has its own CPU and memory limit, so one cannot starve the others.
- Three containers. The finance assistant is a database, a bot and a web part.
Common problems
- Dependencies without health checks. "The database container is running" does not mean "the database is ready". Dependencies wait for a healthcheck, not for the start itself.
- Different paths to one file. If a shared directory is mounted in two containers at different paths, one of them will not see the file.
- Time zone. It is set in each container's
environment; otherwise logs and reminders follow the hosting provider's clock. - Secrets in the Compose file. Tokens and passwords go into
.env, which never enters the repository.
When you do not need it
A single container with no database, such as a static site, is fine with plain Docker, and across several servers with automatic load distribution you need Kubernetes. Compose is the sweet spot for a project on one server.