Compare commits
2 Commits
de2b657ec1
...
5645fba3e1
Author | SHA1 | Date | |
---|---|---|---|
5645fba3e1 | |||
79dc452799 |
@@ -17,10 +17,17 @@ export COMPOSE_FILE="${COMPOSE_DIR}"'/docker-compose.yml'
|
|||||||
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'
|
||||||
|
```
|
||||||
|
|
||||||
## Start
|
## Start
|
||||||
|
|
||||||
```
|
```
|
||||||
docker compose --project-name "${COMPOSE_PROJECT}" --file "${COMPOSE_FILE}" --env-file "${COMPOSE_ENV}" --profile 'full' up --detach
|
docker --context 'fully.qualified.domain.name' compose --project-name "${COMPOSE_PROJECT}" --file "${COMPOSE_FILE}" --env-file "${COMPOSE_ENV}" --profile 'full' up --detach
|
||||||
```
|
```
|
||||||
|
|
||||||
# Initial setup
|
# Initial setup
|
||||||
|
@@ -24,10 +24,17 @@ export COMPOSE_ENV=<add accordingly>
|
|||||||
docker compose --project-name "${COMPOSE_PROJECT}" --file "${COMPOSE_FILE}" --file "${COMPOSE_OVERRIDE}" --env-file "${COMPOSE_ENV}" --profile 'build' build
|
docker compose --project-name "${COMPOSE_PROJECT}" --file "${COMPOSE_FILE}" --file "${COMPOSE_OVERRIDE}" --env-file "${COMPOSE_ENV}" --profile 'build' build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 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
|
||||||
|
|
||||||
```
|
```
|
||||||
docker compose --project-name "${COMPOSE_PROJECT}" --file "${COMPOSE_FILE}" --env-file "${COMPOSE_ENV}" up --detach
|
docker --context 'fully.qualified.domain.name' compose --project-name "${COMPOSE_PROJECT}" --file "${COMPOSE_FILE}" --env-file "${COMPOSE_ENV}" up --detach
|
||||||
```
|
```
|
||||||
|
|
||||||
# Initial setup
|
# Initial setup
|
||||||
|
@@ -27,13 +27,20 @@ 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
|
||||||
|
|
||||||
```
|
```
|
||||||
{%- if ',' in cookiecutter.__component_list_slug %}
|
{%- if ',' in cookiecutter.__component_list_slug %}
|
||||||
docker compose --project-name "${COMPOSE_PROJECT}" --file "${COMPOSE_FILE}" --env-file "${COMPOSE_ENV}" --profile 'full' up --detach
|
docker --context 'fully.qualified.domain.name' compose --project-name "${COMPOSE_PROJECT}" --file "${COMPOSE_FILE}" --env-file "${COMPOSE_ENV}" --profile 'full' up --detach
|
||||||
{%- else %}
|
{%- else %}
|
||||||
docker compose --project-name "${COMPOSE_PROJECT}" --file "${COMPOSE_FILE}" --env-file "${COMPOSE_ENV}" up --detach
|
docker --context 'fully.qualified.domain.name' compose --project-name "${COMPOSE_PROJECT}" --file "${COMPOSE_FILE}" --env-file "${COMPOSE_ENV}" up --detach
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@@ -29,6 +29,11 @@ services:
|
|||||||
retries: 60
|
retries: 60
|
||||||
start_period: 2s
|
start_period: 2s
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
ulimits:
|
||||||
|
nproc: ${ULIMIT_NPROC-65535}
|
||||||
|
nofile:
|
||||||
|
soft: ${ULIMIT_NPROC-65535}
|
||||||
|
hard: ${ULIMIT_NPROC-65535}
|
||||||
extends:
|
extends:
|
||||||
file: common-settings.yml
|
file: common-settings.yml
|
||||||
service: common-settings
|
service: common-settings
|
||||||
@@ -50,6 +55,11 @@ services:
|
|||||||
container_name: "{{ cookiecutter.__service_slug }}-${CONTEXT}"
|
container_name: "{{ cookiecutter.__service_slug }}-${CONTEXT}"
|
||||||
networks:
|
networks:
|
||||||
{{ cookiecutter.__service_slug }}-default:
|
{{ cookiecutter.__service_slug }}-default:
|
||||||
|
ulimits:
|
||||||
|
nproc: ${ULIMIT_NPROC-65535}
|
||||||
|
nofile:
|
||||||
|
soft: ${ULIMIT_NPROC-65535}
|
||||||
|
hard: ${ULIMIT_NPROC-65535}
|
||||||
extends:
|
extends:
|
||||||
file: common-settings.yml
|
file: common-settings.yml
|
||||||
service: common-settings
|
service: common-settings
|
||||||
|
Reference in New Issue
Block a user