fix(compose): Use modern Compose file name (#12) #13
@ -57,8 +57,8 @@ The end result is a directory structure that has everything you need to hit the
|
||||
│ └── extras
|
||||
│ └── .gitkeep
|
||||
├── common-settings.yml
|
||||
├── docker-compose.override.yml
|
||||
├── docker-compose.yml
|
||||
├── compose.override.yaml
|
||||
├── compose.yaml
|
||||
├── env
|
||||
│ └── fqdn_context.env.example
|
||||
└── README.md
|
||||
@ -215,8 +215,8 @@ Make some code changes, for example to the Docker Compose Cookiecutter template.
|
||||
│ └── extras
|
||||
│ └── .gitkeep
|
||||
├── common-settings.yml
|
||||
├── docker-compose.override.yml
|
||||
├── docker-compose.yml
|
||||
├── compose.override.yaml
|
||||
├── compose.yaml
|
||||
├── env
|
||||
│ └── fqdn_context.env.example
|
||||
└── README.md
|
||||
|
@ -34,7 +34,7 @@ Your four answers translate as follows into rendered files.
|
||||
│ ├── Dockerfile
|
||||
...
|
||||
```
|
||||
2. The `service` variable by default copies your `project_slug` answer. It's a style decision whether you leave it at that and just hit `Enter`. The service name will come up in rendered `docker-compose.yml` at purely cosmetic locations such as the `networks:` key, `container_name:` and `/opt/docker-data` volume mount presets, here with `ftp` as the service name:
|
||||
2. The `service` variable by default copies your `project_slug` answer. It's a style decision whether you leave it at that and just hit `Enter`. The service name will come up in rendered `compose.yaml` at purely cosmetic locations such as the `networks:` key, `container_name:` and `/opt/docker-data` volume mount presets, here with `ftp` as the service name:
|
||||
```
|
||||
services:
|
||||
mysql:
|
||||
@ -93,8 +93,8 @@ Above example of a multi-component (two in this case) `grafana` service will giv
|
||||
│ └── extras
|
||||
│ └── .gitkeep
|
||||
├── common-settings.yml
|
||||
├── docker-compose.override.yml
|
||||
├── docker-compose.yml
|
||||
├── compose.override.yaml
|
||||
├── compose.yaml
|
||||
├── env
|
||||
│ └── fqdn_context.env.example
|
||||
└── README.md
|
||||
@ -114,8 +114,8 @@ With an alternative single-component `hashicorpvault` service the result may loo
|
||||
│ └── extras
|
||||
│ └── .gitkeep
|
||||
├── common-settings.yml
|
||||
├── docker-compose.override.yml
|
||||
├── docker-compose.yml
|
||||
├── compose.override.yaml
|
||||
├── compose.yaml
|
||||
├── env
|
||||
│ └── fqdn_context.env.example
|
||||
└── README.md
|
||||
@ -126,7 +126,7 @@ Check out file contents over in the [examples/hashicorpvault](examples/hashicorp
|
||||
|
||||
Consider Cookiecutter's project directory and rendered files a starting point. It won't do everything perfectly.
|
||||
|
||||
Imagine if you will a service that consists of [Infinispan](https://infinispan.org/) among other things. In Docker Hub's content-addressable image store Infinispan's location is at `infinispan/server` so you obviously want that exact string with a forward slash to show up in your `docker-compose.yml` as the `image:` key's value, same with your `Dockerfile`. The `image:` key's value comes from what you enter in Cookiecutter's `component_list` prompt. Component strings are then used to also pre-fill the `volumes:` key.
|
||||
Imagine if you will a service that consists of [Infinispan](https://infinispan.org/) among other things. In Docker Hub's content-addressable image store Infinispan's location is at `infinispan/server` so you obviously want that exact string with a forward slash to show up in your `compose.yaml` as the `image:` key's value, same with your `Dockerfile`. The `image:` key's value comes from what you enter in Cookiecutter's `component_list` prompt. Component strings are then used to also pre-fill the `volumes:` key.
|
||||
|
||||
_**This**_ will cause obvious issues (but the `image:` key is kinda correct):
|
||||
```
|
||||
|
@ -1,6 +1,6 @@
|
||||
# FIXME
|
||||
|
||||
Search and replace all mentions of FIXME with sensible content in this file and in [docker-compose.yml](docker-compose.yml).
|
||||
Search and replace all mentions of FIXME with sensible content in this file and in [compose.yaml](compose.yaml).
|
||||
|
||||
# Grafana Docker Compose files
|
||||
|
||||
@ -18,7 +18,7 @@ When everything's ready start Grafana with Docker Compose, otherwise head down t
|
||||
export COMPOSE_DIR='/opt/containers/grafana'
|
||||
export COMPOSE_CTX='ux_vilnius'
|
||||
export COMPOSE_PROJECT='grafana-'"${COMPOSE_CTX}"
|
||||
export COMPOSE_FILE="${COMPOSE_DIR}"'/docker-compose.yml'
|
||||
export COMPOSE_FILE="${COMPOSE_DIR}"'/compose.yaml'
|
||||
export COMPOSE_ENV=<add accordingly>
|
||||
```
|
||||
|
||||
@ -77,7 +77,7 @@ Create ZFS datasets and set permissions as needed.
|
||||
zfs create -p 'zpool/docker-data/grafana-'"${COMPOSE_CTX}"'/nginx/data/logs'
|
||||
zfs create -p 'zpool/docker-data/grafana-'"${COMPOSE_CTX}"'/nginx/config'
|
||||
```
|
||||
FIXME When changing bind mount locations to real ones remember to also update `volumes:` in [docker-compose.yml](docker-compose.yml) FIXME
|
||||
FIXME When changing bind mount locations to real ones remember to also update `volumes:` in [compose.yaml](compose.yaml) FIXME
|
||||
|
||||
* Create subdirs
|
||||
```
|
||||
|
@ -27,7 +27,7 @@ SUBNET=172.30.95.0/24
|
||||
|
||||
|
||||
|
||||
# See 'docker-compose.override.yml' for how to make a variable available in
|
||||
# See 'compose.override.yaml' for how to make a variable available in
|
||||
# a Dockerfile
|
||||
# ---
|
||||
# EXAMPLE_ARG_FROM_ENV_FILE=must_be_available_in_dockerfile
|
||||
|
@ -1,6 +1,6 @@
|
||||
# FIXME
|
||||
|
||||
Search and replace all mentions of FIXME with sensible content in this file and in [docker-compose.yml](docker-compose.yml).
|
||||
Search and replace all mentions of FIXME with sensible content in this file and in [compose.yaml](compose.yaml).
|
||||
|
||||
# Vault Docker Compose files
|
||||
|
||||
@ -18,8 +18,8 @@ When everything's ready start Vault with Docker Compose, otherwise head down to
|
||||
export COMPOSE_DIR='/opt/containers/hashicorpvault'
|
||||
export COMPOSE_CTX='ux_vilnius'
|
||||
export COMPOSE_PROJECT='vault-'"${COMPOSE_CTX}"
|
||||
export COMPOSE_FILE="${COMPOSE_DIR}"'/docker-compose.yml'
|
||||
export COMPOSE_OVERRIDE="${COMPOSE_DIR%/}"'/docker-compose.override.yml'
|
||||
export COMPOSE_FILE="${COMPOSE_DIR}"'/compose.yaml'
|
||||
export COMPOSE_OVERRIDE="${COMPOSE_DIR%/}"'/compose.override.yaml'
|
||||
export COMPOSE_ENV=<add accordingly>
|
||||
```
|
||||
|
||||
@ -81,7 +81,7 @@ Create ZFS datasets and set permissions as needed.
|
||||
zfs create -p 'zpool/docker-data/vault-'"${COMPOSE_CTX}"'/vault/data/logs'
|
||||
zfs create -p 'zpool/docker-data/vault-'"${COMPOSE_CTX}"'/vault/config'
|
||||
```
|
||||
FIXME When changing bind mount locations to real ones remember to also update `volumes:` in [docker-compose.yml](docker-compose.yml) FIXME
|
||||
FIXME When changing bind mount locations to real ones remember to also update `volumes:` in [compose.yaml](compose.yaml) FIXME
|
||||
|
||||
* Create subdirs
|
||||
```
|
||||
|
@ -26,7 +26,7 @@ SUBNET=172.30.95.0/24
|
||||
|
||||
|
||||
|
||||
# See 'docker-compose.override.yml' for how to make a variable available in
|
||||
# See 'compose.override.yaml' for how to make a variable available in
|
||||
# a Dockerfile
|
||||
# ---
|
||||
# EXAMPLE_ARG_FROM_ENV_FILE=must_be_available_in_dockerfile
|
||||
|
@ -1,6 +1,6 @@
|
||||
# FIXME
|
||||
|
||||
Search and replace all mentions of FIXME with sensible content in this file and in [docker-compose.yml](docker-compose.yml).
|
||||
Search and replace all mentions of FIXME with sensible content in this file and in [compose.yaml](compose.yaml).
|
||||
|
||||
# {{ cookiecutter.__service_slug.capitalize() }} Docker Compose files
|
||||
|
||||
@ -18,8 +18,8 @@ When everything's ready start {{ cookiecutter.__service_slug.capitalize() }} wit
|
||||
export COMPOSE_DIR='/opt/containers/{{ cookiecutter.__project_slug }}'
|
||||
export COMPOSE_CTX='ux_vilnius'
|
||||
export COMPOSE_PROJECT='{{ cookiecutter.__service_slug }}-'"${COMPOSE_CTX}"
|
||||
export COMPOSE_FILE="${COMPOSE_DIR}"'/docker-compose.yml'{% if cookiecutter.build == "yes" %}
|
||||
export COMPOSE_OVERRIDE="${COMPOSE_DIR%/}"'/docker-compose.override.yml'{% endif %}
|
||||
export COMPOSE_FILE="${COMPOSE_DIR}"'/compose.yaml'{% if cookiecutter.build == "yes" %}
|
||||
export COMPOSE_OVERRIDE="${COMPOSE_DIR%/}"'/compose.override.yaml'{% endif %}
|
||||
export COMPOSE_ENV=<add accordingly>
|
||||
```
|
||||
|
||||
@ -108,7 +108,7 @@ Create ZFS datasets and set permissions as needed.
|
||||
zfs create -p 'zpool/docker-data/{{ cookiecutter.__service_slug }}-'"${COMPOSE_CTX}"'/{{ cookiecutter.__service_slug }}/config'
|
||||
{%- endif %}
|
||||
```
|
||||
FIXME When changing bind mount locations to real ones remember to also update `volumes:` in [docker-compose.yml](docker-compose.yml) FIXME
|
||||
FIXME When changing bind mount locations to real ones remember to also update `volumes:` in [compose.yaml](compose.yaml) FIXME
|
||||
|
||||
* Create subdirs
|
||||
```
|
||||
|
@ -33,7 +33,7 @@ SUBNET=172.30.95.0/24
|
||||
|
||||
|
||||
|
||||
# See 'docker-compose.override.yml' for how to make a variable available in
|
||||
# See 'compose.override.yaml' for how to make a variable available in
|
||||
# a Dockerfile
|
||||
# ---
|
||||
# EXAMPLE_ARG_FROM_ENV_FILE=must_be_available_in_dockerfile
|
||||
|
Loading…
x
Reference in New Issue
Block a user