container: support bind mounted db data directory and mysql config

This commit is contained in:
uumas
2023-04-21 07:44:23 +03:00
parent 20e38332e6
commit 079b008111
7 changed files with 79 additions and 21 deletions

View File

@@ -24,10 +24,6 @@
include_tasks: proxy.yml
when: reverse_proxy_type != 'none'
- name: Database container
include_tasks: database.yml
when: docker_database != 'none'
- name: Additional services
when: docker_additional_services is defined
block:
@@ -74,6 +70,25 @@
container_workdir: /opt/{{ docker_service }}
when: docker_service_suffix is not defined
- name: Create mounts directory
when: create_mounts_directory
block:
- name: Set docker_mounts_dir
set_fact:
docker_mounts_dir: "{{ container_workdir }}/mounts"
- name: Create directory {{ docker_mounts_dir }}
file:
path: "{{ docker_mounts_dir }}"
state: directory
owner: "{{ user.uid | default(omit) }}"
group: "{{ user.group | default(omit) }}"
mode: 0700
- name: Database container
include_tasks: database.yml
when: docker_database != 'none'
- name: Container volumes
import_tasks: volumes.yml