Implemented helper role docker-central-database and refactored code

This commit is contained in:
2025-02-04 18:14:37 +01:00
parent cb6a42e97d
commit 5503326ea6
91 changed files with 358 additions and 237 deletions

View File

@@ -86,7 +86,7 @@ Detailed steps for backing up your Akaunting instance, including setting manual
### Setting Variables
Variables are crucial in configuring your Akaunting setup. Ensure you set the following variables correctly in your environment:
- `docker_compose_instance_directory`: Set this variable to the path where your Docker Compose files for Akaunting are located.
- `docker_compose.directories.instance`: Set this variable to the path where your Docker Compose files for Akaunting are located.
- `akaunting_db_password`, `applications.akaunting.version`, `applications.akaunting.company_name`, `applications.akaunting.company_email`, `applications.akaunting.setup_admin_email`, and `akaunting_setup_admin_password`: These should be set in your `.env` files as per your requirements.
### Additional Configuration

View File

@@ -1,6 +1,7 @@
---
- name: "include docker/compose/database.yml"
include_tasks: docker/compose/database.yml
- name: "include docker-central-database"
include_role:
name: docker-central-database
- name: "include tasks nginx-docker-proxy-domain.yml"
include_tasks: nginx-docker-proxy-domain.yml
@@ -9,5 +10,5 @@
include_tasks: update-repository-with-docker-compose.yml
- name: configure run.env
template: src=run.env.j2 dest={{docker_compose_instance_directory}}/env/run.env
template: src=run.env.j2 dest={{docker_compose.directories.instance}}/env/run.env
notify: docker compose project setup

View File

@@ -1,6 +1,6 @@
services:
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
application:
image: docker.io/akaunting/akaunting:{{applications.akaunting.version}}