docs(docker-compose): Render Docker context creation before build process
This commit is contained in:
parent
0f4b7ac7a5
commit
024a056d9e
@ -18,12 +18,6 @@ export COMPOSE_OVERRIDE="${COMPOSE_DIR%/}"'/docker-compose.override.yml'
|
|||||||
export COMPOSE_ENV=<add accordingly>
|
export COMPOSE_ENV=<add accordingly>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Build
|
|
||||||
|
|
||||||
```
|
|
||||||
docker compose --project-name "${COMPOSE_PROJECT}" --file "${COMPOSE_FILE}" --file "${COMPOSE_OVERRIDE}" --env-file "${COMPOSE_ENV}" --profile 'build' build
|
|
||||||
```
|
|
||||||
|
|
||||||
## Context
|
## Context
|
||||||
|
|
||||||
On your deployment machine create the necessary Docker context to connect to and control the Docker daemon on whatever target host you'll be using, for example:
|
On your deployment machine create the necessary Docker context to connect to and control the Docker daemon on whatever target host you'll be using, for example:
|
||||||
@ -31,6 +25,12 @@ On your deployment machine create the necessary Docker context to connect to and
|
|||||||
docker context create fully.qualified.domain.name --docker 'host=ssh://root@fully.qualified.domain.name'
|
docker context create fully.qualified.domain.name --docker 'host=ssh://root@fully.qualified.domain.name'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
```
|
||||||
|
docker compose --project-name "${COMPOSE_PROJECT}" --file "${COMPOSE_FILE}" --file "${COMPOSE_OVERRIDE}" --env-file "${COMPOSE_ENV}" --profile 'build' build
|
||||||
|
```
|
||||||
|
|
||||||
## Start
|
## Start
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -18,6 +18,13 @@ export COMPOSE_OVERRIDE="${COMPOSE_DIR%/}"'/docker-compose.override.yml'{% endif
|
|||||||
export COMPOSE_ENV=<add accordingly>
|
export COMPOSE_ENV=<add accordingly>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
On your deployment machine create the necessary Docker context to connect to and control the Docker daemon on whatever target host you'll be using, for example:
|
||||||
|
```
|
||||||
|
docker context create fully.qualified.domain.name --docker 'host=ssh://root@fully.qualified.domain.name'
|
||||||
|
```
|
||||||
|
|
||||||
{%- if cookiecutter.build == "yes" %}
|
{%- if cookiecutter.build == "yes" %}
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
@ -27,13 +34,6 @@ docker compose --project-name "${COMPOSE_PROJECT}" --file "${COMPOSE_FILE}" --fi
|
|||||||
```
|
```
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
## Context
|
|
||||||
|
|
||||||
On your deployment machine create the necessary Docker context to connect to and control the Docker daemon on whatever target host you'll be using, for example:
|
|
||||||
```
|
|
||||||
docker context create fully.qualified.domain.name --docker 'host=ssh://root@fully.qualified.domain.name'
|
|
||||||
```
|
|
||||||
|
|
||||||
## Start
|
## Start
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user