Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/odolbeau/dce
Docker Compose Extended
https://github.com/odolbeau/dce
configuration docker docker-compose
Last synced: 20 days ago
JSON representation
Docker Compose Extended
- Host: GitHub
- URL: https://github.com/odolbeau/dce
- Owner: odolbeau
- Created: 2023-04-14T13:08:59.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-20T09:45:53.000Z (almost 2 years ago)
- Last Synced: 2024-11-22T01:42:08.203Z (3 months ago)
- Topics: configuration, docker, docker-compose
- Language: Shell
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DCE
DCE stands for Docker ComposE or Docker Compose Extended.
The goal is to simplify the usage of the docker compose commands when using several Compose configuration files or options.
The command will read the `.dcerc` configuration file if present in order to automatically add desired options to the `docker compose` command.## Installation
Simply copy the `dce` command of this repository in a folder which is present in your $PATH.
```bash
curl -s https://raw.githubusercontent.com/odolbeau/dce/master/dce | sudo tee /usr/local/bin/dce && sudo chmod +x /usr/local/bin/dce
```In order to install bash_completion:
```bash
curl -s https://raw.githubusercontent.com/odolbeau/dce/master/bash_completion | sudo tee /etc/bash_completion.d/dce
```## Usage
### Automatically add options using a `.dcerc` file.
In a project which contains several compose configuration files, you can create a `.dcerc` file like this one:
```
# Give a name to this project (instead of using the current directory name)
-p my_project name# includes all needed compose configuration files
-i docker/services/traefik.yml
-i docker/websites/blog.yml
-i docker/websites/another_blog.yml# Include some secrets stored in a specific env file
--env-file .secrets
```Then simply call the `dce` command and you're done! 👌
Ship this file in your repository to ensure your collaborators use exactly the same config than you!### Dealing with environment files
By default, `dce` will include `.env` and `.env.prod` files if present in the current folder. You can change the default environment used by `dce` by creating a `~/.config/dce/env` file. For example, if this file contains "local", `dce` will automatically includes `env` and `.env.local` files if it exists.
## Improvements
Use `--project-directory` option when provided to look for a .dcerc file in the given folder