2023-12-15 19:49:46 +00:00
|
|
|
# Docker Compose Ops (dc-ops)
|
|
|
|
|
|
|
|
`dc-ops` is a shell script designed to operations automate the local building and updating of several Docker services.
|
|
|
|
It aims to simplify continuous delivery (CD) processes and infrastructure management in a Docker environment.
|
|
|
|
|
|
|
|
## How does it work?
|
|
|
|
|
2023-12-15 21:34:34 +00:00
|
|
|
* The script iterates through each line of the `stacklist` file (skipping comments) or through all cli parameters
|
2023-12-15 19:49:46 +00:00
|
|
|
* It fetches the latest changes from the remote git repository and checks if there are new commits
|
|
|
|
* If there is a change it pulls the updates from the remote git repository, otherwise the entry is skipped
|
|
|
|
* Following this, it runs `docker compose up` which builds, (re)creates and starts the containers
|
|
|
|
|
2023-12-15 21:34:34 +00:00
|
|
|
The `stacklist` file can list either a directory containing a `docker-compose.yml` file or a precise `docker-compose` file (see `stacklist.example`).
|
|
|
|
Alternatively, the stacklist can also be passed as a list of parameters.
|
2023-12-15 19:49:46 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2023-12-15 21:38:59 +00:00
|
|
|
* `./dc-ops /path/to/repo /path/to/another-repo /path/with/docker-compose-dev.yml` or
|
|
|
|
* Update `stacklist` file and run `./dc-ops` (or create a crontab entry)
|