Skip to content

Lifailon/lazycompose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lazycompose 🐙

English | Russian

Manage Docker Compose services from the terminal or browser.

Project list

Service list

I lacked a full-featured tool for managing containers using Docker Compose that covered all my needs. There is the excellent Dockge project, but it lacks features for managing individual services or conveniently viewing and filtering logs, for example, as in Dozzle.

Feature list:

  • Search for all projects and quickly switch between them.
  • Monitor statistics for all services in the selected project.
  • View logs with colored output for each service.
  • Display service status during command execution.

Default command management list:

commands

Configuration

The tool allows you to define your own set of commands or scripts for service management. If you have previously worked with lazydocker, this configuration will be familiar.

Configuration format:

customCommands:
    # Name to display in the command list
  - name: 📝 Compose edit
    # Command to be executed
    command: micro $COMPOSE_FILE
    # Display command output in the current window
    attach: false

List of variables:

  • COMPOSE_FIND_DEPTH - depth for searching compose files.
  • COMPOSE_PATH - path to the directory with projects.
  • COMPOSE_FILE - path to the compose file for the selected project.
  • COMPOSE_PROJECT_NAME - name of the selected project.
  • COMPOSE_CONTAINER_NAME - name of the selected container.
  • COMPOSE_SERVICE_NAME - name of the selected service.
  • COMPOSE_IMAGE_NAME - name of the image used in the selected service.

Used tools

This project became possible by combining the capabilities of popular utilities.

The interface is entirely based on fzf, and the image includes the following auxiliary tools:

  • docker-cli for container management.
  • docker-compose for service management.
  • micro for editing compose, env, and Dockerfile files.
  • ttyd for launching the interface in the browser.
  • yq for parsing yaml configuration.
  • jq for parsing service configurations and logs in json format.
  • fd for log filtering with regex support.
  • tailspin for colored log output.
  • dive for analyzing images in selected services.

Install

Docker

To run the container, download the docker-compose file and use the image from Docker Hub:

mkdir lazycompose && cd lazycompose
curl -sSL https://raw.githubusercontent.com/Lifailon/lazycompose/refs/heads/main/docker-compose.yml -o docker-compose.yml
docker-compose up -d
docker attach lazycompose

The interface and file editor support mouse control.

To enable web mode, change the TTYD_MODE variable to true and go to http://127.0.0.1:3333

Make

For local installation, use Makefile with pre-installed dependencies on a Debian-based system:

git clone https://github.com/Lifailon/lazycompose
cd lazycompose
make install
COMPOSE_PATH=/home/lifailon/docker lazycompose

About

Manage Docker Compose services from the terminal (TUI) or browser.

Topics

Resources

Stars

Watchers

Forks

Contributors