mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-08 10:26:35 +00:00
Fix CI Docker-in-Docker deployment, introduce vfs storage-driver, add inner dockerd bootstrap, enable portable json-file logging when running inside a container, and update workflow triggers for multi-branch testing.
Includes: - Rewrite of test-deploy workflow to use isolated inner dockerd with privileged mode. - Switch logging drivers to 'json-file' when IS_CONTAINER=true for compatibility with non-systemd CI runners. - Adjust Dockerfile to install docker CLI and simplify package setup. - Improve inventory creation and deploy steps for CI stability. - Fully compatible with Ansible 2.20 variable handling. Conversation reference: https://chatgpt.com/share/6930e285-9604-800f-aad8-7a81c928548c
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
- "{{ docker_compose.files.env }}"
|
||||
{% endif %}
|
||||
logging:
|
||||
driver: journald
|
||||
driver: {{ "json-file" if IS_CONTAINER | bool else 'journald' }}
|
||||
{% filter indent(4) %}
|
||||
{% include 'roles/docker-container/templates/resource.yml.j2' %}
|
||||
{% endfilter %}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
container_name: {{ application_id | get_entity_name }}-redis
|
||||
restart: {{ DOCKER_RESTART_POLICY }}
|
||||
logging:
|
||||
driver: journald
|
||||
driver: {{ "json-file" if IS_CONTAINER else 'journald' }}
|
||||
volumes:
|
||||
- redis:/data
|
||||
# Just save in memory and prevent huge redis_volumes
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{{ database_host }}:
|
||||
container_name: {{ application_id | get_entity_name }}-database
|
||||
logging:
|
||||
driver: journald
|
||||
driver: {{ "json-file" if IS_CONTAINER | bool else 'journald' }}
|
||||
image: {{ database_image }}:{{ database_version }}
|
||||
restart: {{ DOCKER_RESTART_POLICY }}
|
||||
env_file:
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:8080"
|
||||
volumes:
|
||||
- jenkins_data:/var/jenkins_home
|
||||
log_driver: journald
|
||||
log_driver: {{ "json-file" if IS_CONTAINER | bool else 'journald' }}
|
||||
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||
@@ -5,7 +5,7 @@
|
||||
container_name: {{ MATRIX_SYNAPSE_NAME }}
|
||||
restart: {{ DOCKER_RESTART_POLICY }}
|
||||
logging:
|
||||
driver: journald
|
||||
driver: {{ "json-file" if IS_CONTAINER | bool else 'journald' }}
|
||||
volumes:
|
||||
- synapse_data:/data
|
||||
- {{ MATRIX_SYNAPSE_CONFIG_PATH_HOST }}:{{ MATRIX_SYNAPSE_CONFIG_PATH_CONTAINER }}:ro
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
image: "{{ NEXTCLOUD_PROXY_IMAGE }}:{{ NEXTCLOUD_PROXY_VERSION }}"
|
||||
container_name: "{{ NEXTCLOUD_PROXY_CONTAINER }}"
|
||||
logging:
|
||||
driver: journald
|
||||
driver: {{ "json-file" if IS_CONTAINER | bool else 'journald' }}
|
||||
restart: {{ DOCKER_RESTART_POLICY }}
|
||||
ports:
|
||||
- "127.0.0.1:{{ NEXTCLOUD_PORT }}:{{ container_port }}"
|
||||
@@ -99,7 +99,7 @@
|
||||
image: "{{ NEXTCLOUD_IMAGE }}:{{ NEXTCLOUD_VERSION }}"
|
||||
restart: {{ DOCKER_RESTART_POLICY }}
|
||||
logging:
|
||||
driver: journald
|
||||
driver: {{ "json-file" if IS_CONTAINER | bool else 'journald' }}
|
||||
volumes:
|
||||
- data:{{ NEXTCLOUD_DOCKER_WORK_DIRECTORY }}
|
||||
entrypoint: /cron.sh
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# @todo Test which containers can be removed crom cental_database networks
|
||||
x-op-app: &app
|
||||
logging:
|
||||
driver: journald
|
||||
driver: {{ "json-file" if IS_CONTAINER | bool else 'journald' }}
|
||||
image: {{ OPENPROJECT_CUSTOM_IMAGE }}
|
||||
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(2) }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user