mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-11-06 21:28:02 +00:00
Includes: - New role: web-app-shopware (Docker, MariaDB, Redis, OpenSearch) - Updated networks and ports configuration - Automated install, migration, and admin creation - Optional IAM integration via OIDC/LDAP plugins Reference: https://chatgpt.com/share/6907b0d4-ab14-800f-b576-62c0d26c8ad1
67 lines
2.1 KiB
Django/Jinja
67 lines
2.1 KiB
Django/Jinja
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
|
|
|
php:
|
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
|
image: "{{ SHOPWARE_PHP_IMAGE }}:{{ SHOPWARE_VERSION }}"
|
|
container_name: "{{ SHOPWARE_PHP_CONTAINER }}"
|
|
working_dir: /var/www/html
|
|
volumes:
|
|
- data:/var/www/html
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
|
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
|
|
|
|
nginx:
|
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
|
image: "{{ SHOPWARE_NGINX_IMAGE }}:{{ SHOPWARE_NGINX_VERSION }}"
|
|
container_name: "{{ SHOPWARE_NGINX_CONTAINER }}"
|
|
ports:
|
|
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}"
|
|
volumes:
|
|
- data:/var/www/html:ro
|
|
depends_on:
|
|
- php
|
|
{% 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:
|
|
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:
|
|
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 %}
|
|
|
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
|
data:
|
|
name: {{ SHOPWARE_VOLUME }}
|
|
|
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|