mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-11-06 13:17:58 +00:00
Implemented service name
This commit is contained in:
@@ -41,6 +41,10 @@ docker:
|
||||
cpus: 0.25
|
||||
mem_reservation: 256m
|
||||
mem_limit: 512m
|
||||
elasticsearch:
|
||||
mem_limit: 2gb
|
||||
opensearch:
|
||||
mem_limit: 2gb
|
||||
search:
|
||||
enabled: "{{ SHOPWARE_SEARCH_ENABLED }}"
|
||||
engine: "{{ SHOPWARE_SEARCH_ENGINE }}"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||
|
||||
php:
|
||||
{% set service_name = 'php' %}
|
||||
{{ service_name }}:
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
image: "{{ SHOPWARE_PHP_IMAGE }}:{{ SHOPWARE_VERSION }}"
|
||||
container_name: "{{ SHOPWARE_PHP_CONTAINER }}"
|
||||
@@ -12,7 +13,8 @@
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
|
||||
|
||||
nginx:
|
||||
{% set service_name = 'nginx' %}
|
||||
{{ service_name }}:
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
image: "{{ SHOPWARE_NGINX_IMAGE }}:{{ SHOPWARE_NGINX_VERSION }}"
|
||||
container_name: "{{ SHOPWARE_NGINX_CONTAINER }}"
|
||||
@@ -25,36 +27,27 @@
|
||||
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
{% if SHOPWARE_REDIS_ENABLED %}
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: redis
|
||||
command: ["redis-server", "--appendonly", "yes"]
|
||||
restart: unless-stopped
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
{% endif %}
|
||||
|
||||
{% if SHOPWARE_SEARCH_ENABLED %}
|
||||
{% if SHOPWARE_SEARCH_ENGINE == 'opensearch' %}
|
||||
opensearch:
|
||||
{% set service_name = 'opensearch' %}
|
||||
{{ service_name }}:
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
image: opensearchproject/opensearch:2
|
||||
environment:
|
||||
- discovery.type=single-node
|
||||
- plugins.security.disabled=true
|
||||
ulimits:
|
||||
memlock: { soft: -1, hard: -1 }
|
||||
mem_limit: 2g
|
||||
restart: unless-stopped
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
{% else %}
|
||||
elasticsearch:
|
||||
{% set service_name = 'elasticsearch' %}
|
||||
{{ service_name }}:
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.22
|
||||
environment:
|
||||
- discovery.type=single-node
|
||||
ulimits:
|
||||
memlock: { soft: -1, hard: -1 }
|
||||
mem_limit: 2g
|
||||
restart: unless-stopped
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user