https://github.com/optum/admiral
Controls your fleet of docker containers.
https://github.com/optum/admiral
docker docker-compose java
Last synced: about 1 month ago
JSON representation
Controls your fleet of docker containers.
- Host: GitHub
- URL: https://github.com/optum/admiral
- Owner: Optum
- License: apache-2.0
- Created: 2025-01-16T15:29:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-27T21:56:07.000Z (over 1 year ago)
- Last Synced: 2025-03-11T15:51:10.085Z (over 1 year ago)
- Topics: docker, docker-compose, java
- Language: Java
- Homepage:
- Size: 230 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# admiral
Controls your fleet of docker containers.
## Configuration Variable Files (not Environment Variable Files)
Admiral supports environment variable files like docker-compose, but Admiral also supports something called
"configuration variable files" that docker-compose does not support.
Let's begin by showing what docker-compose does. You can control the configuration of docker-compose.yaml
through the specially-named ".env" file like this:
```yaml
#file=.env
IMAGE_VERSION:1.34.7
```
```yaml
#file=docker-compose.yaml
services:
sample1:
image: "myappimage:${IMAGE_VERSION}"
```
```yaml
#docker-compose config
services:
sample1:
image: myappimage:1.34.7
version: '3.9'
```
Now what we wish docker-compose would do... let us put IMAGE_VERSION in a file
other than .env, like maybe production.env. This is what happens when you do:
```yaml
#file=production.env
IMAGE_VERSION:1.34.7
```
```yaml
#file=docker-compose.yaml
services:
sample1:
env_file: production.env
image: "myappimage:${IMAGE_VERSION}"
```
```yaml
#docker-compose config
WARNING: The IMAGE_VERSION variable is not set. Defaulting to a blank string.
services:
sample1:
environment:
IMAGE_VERSION: 1.34.7
image: 'myappimage:'
version: '3.9'
```
You see: docker-compose takes the contents of env_file and does two things:
1. It sends the variable to the containerController
2. It **doesn't** make that variable available to the docker-compose configuration.
What we want is a named .env file (a **config** file, not an **environment** file) that does the opposite:
1. It **doesn't** send the variable to the containerController
2. It makes that variable available to the docker-compose configuration.
There are plenty of people begging for this:
* https://github.com/docker/compose/issues/6170
* https://github.com/docker/compose/issues/8379
Admiral delivers! And to differentiate config files from environment files, we can use an
extension of ".config" or the brief ".conf" instead of ".env".
(I'd rather talk about "the Production Config file" than "the Production Conf file" so just use .config
and deal with typing the extra two characters.)
```yaml
x-admiral-project:
config_file: production.config
```
There is another docker-compose "won'tfix" that Admiral provides:
* https://github.com/docker/compose/issues/745
```yaml
x-admiral-project:
name:
```