mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-09 02:45:17 +00:00
- Unify encoding/collation variables - Improve connection logic for mysql_db module - Switch to PyMySQL install path to avoid mysqlclient build failures - Update healthcheck to container-friendly CMD-SHELL usage - Normalize network and port configuration These changes were applied during CI/CD pipeline debugging. The root CI/CD connectivity issue is still not fixed. Reference: https://chatgpt.com/share/6931adf0-ce7c-800f-86f3-f867fbd3191f
34 lines
1.0 KiB
Django/Jinja
34 lines
1.0 KiB
Django/Jinja
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
|
|
|
mariadb:
|
|
container_name: "{{ MARIADB_NAME }}"
|
|
image: "{{ MARIADB_CUSTOM_IMAGE }}"
|
|
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(4) }}
|
|
command:
|
|
- "--transaction-isolation=READ-COMMITTED"
|
|
- "--binlog-format=ROW"
|
|
|
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
|
{% if MARIADB_EXPOSE_LOCAL %}
|
|
ports:
|
|
- "127.0.0.1:{{ MARIADB_PORT }}:3306"
|
|
{% endif %}
|
|
volumes:
|
|
- "data:/var/lib/mysql"
|
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
|
healthcheck:
|
|
test:
|
|
- "CMD-SHELL"
|
|
- >
|
|
mariadb
|
|
{% if MARIADB_EXPOSE_LOCAL %}-h127.0.0.1 -P3306{% endif %}
|
|
-u root -p{{ MARIADB_ROOT_PWD }} -e 'SHOW DATABASES;'
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 18
|
|
|
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
|
data:
|
|
name: "{{ MARIADB_VOLUME }}"
|
|
|
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %} |