mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Huge role refactoring/cleanup. Other commits will propably follow. Because some bugs will exist. Still important for longrun and also for auto docs/help/slideshow generation
This commit is contained in:
31
roles/web-app-akaunting/Administration.md
Normal file
31
roles/web-app-akaunting/Administration.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Administration
|
||||
|
||||
## View Logs
|
||||
To check the latest logs of Akaunting.
|
||||
```bash
|
||||
docker-compose exec -it akaunting tail -n 300 storage/logs/laravel.log
|
||||
```
|
||||
|
||||
## Access Containers
|
||||
- Akaunting Container: `docker-compose exec -it akaunting bash`
|
||||
- Database Container: `docker-compose exec -it akaunting-db /bin/mariadb -u admin --password=$akaunting_db_password akaunting`
|
||||
|
||||
## Manual Update
|
||||
Execute PHP artisan commands in the following order for updating Akaunting:
|
||||
|
||||
```bash
|
||||
php artisan about
|
||||
php artisan cache:clear
|
||||
php artisan view:clear
|
||||
php artisan migrate:status
|
||||
php artisan update:all
|
||||
php artisan update:db
|
||||
```
|
||||
|
||||
## Composer
|
||||
To install Composer, a PHP dependency management tool:
|
||||
|
||||
```bash
|
||||
curl https://getcomposer.org/download/2.4.1/composer.phar --output composer.phar
|
||||
php composer.phar install
|
||||
```
|
29
roles/web-app-akaunting/Installation.md
Normal file
29
roles/web-app-akaunting/Installation.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Installation Guide
|
||||
|
||||
1. **Navigate to the Docker Compose Directory**
|
||||
Change into the directory where the Docker Compose files reside.
|
||||
```bash
|
||||
cd {{path_docker_compose_instances}}akaunting/
|
||||
```
|
||||
|
||||
2. **Set Environment Variables**
|
||||
Ensure timeouts are increased to handle long operations:
|
||||
```bash
|
||||
export COMPOSE_HTTP_TIMEOUT=600
|
||||
export DOCKER_CLIENT_TIMEOUT=600
|
||||
```
|
||||
|
||||
3. **Start Akaunting Service**
|
||||
Run the setup command with the `AKAUNTING_SETUP` variable:
|
||||
```bash
|
||||
AKAUNTING_SETUP=true docker-compose -p akaunting up -d
|
||||
```
|
||||
|
||||
4. **Finalizing Setup**
|
||||
After verifying that the web interface works, restart services:
|
||||
```bash
|
||||
docker-compose down
|
||||
docker-compose -p akaunting up -d
|
||||
```
|
||||
|
||||
For further details, visit the [Akaunting Documentation](https://akaunting.com/) and the [Akaunting GitHub Repository](https://github.com/akaunting/docker).
|
26
roles/web-app-akaunting/README.md
Normal file
26
roles/web-app-akaunting/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Akaunting
|
||||
|
||||
## Description
|
||||
|
||||
This Ansible role sets up and manages Akaunting, an innovative online accounting software, using Docker and Docker Compose. Empower your financial management with Akaunting—a dynamic and feature-rich accounting platform designed to simplify your bookkeeping and boost your business growth. Enjoy intuitive tools, real-time insights, and an energetic approach to your finances.
|
||||
|
||||
For detailed administration and troubleshooting, check the [Administration Reference](./Administration.md) and the [Installation Guide](./Installation.md).
|
||||
|
||||
## Overview
|
||||
|
||||
This role provides a comprehensive Dockerized environment for running Akaunting. It deploys the Akaunting application alongside a MariaDB database, configures environment variables, and integrates with Nginx as a reverse proxy. This setup is ideal for both production and development environments.
|
||||
|
||||
### Key Features
|
||||
|
||||
- **Complete Dockerized Deployment**: Uses Docker Compose to run Akaunting and its associated database.
|
||||
- **Environment Configuration**: Automatically creates and configures the necessary environment files.
|
||||
- **Nginx Integration**: Sets up Nginx for handling domain-specific requests and SSL termination.
|
||||
- **Manual Update and Log Access**: Provides guidance for viewing logs, accessing containers, and performing manual updates.
|
||||
|
||||
## Credits 📝
|
||||
|
||||
Developed and maintained by **Kevin Veen-Birkenbach**.
|
||||
Learn more at [www.veen.world](https://www.veen.world)
|
||||
|
||||
Part of the [CyMaIS Project](https://github.com/kevinveenbirkenbach/cymais)
|
||||
License: [CyMaIS NonCommercial License (CNCL)](https://s.veen.world/cncl)
|
25
roles/web-app-akaunting/meta/main.yml
Normal file
25
roles/web-app-akaunting/meta/main.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
galaxy_info:
|
||||
author: "Kevin Veen-Birkenbach"
|
||||
description: "Empower your financial management with Akaunting, a dynamic and feature-rich accounting platform designed to simplify your bookkeeping and boost your business growth. Enjoy intuitive tools, real-time insights, and an energetic approach to your finances."
|
||||
license: "CyMaIS NonCommercial License (CNCL)"
|
||||
license_url: "https://s.veen.world/cncl"
|
||||
company: |
|
||||
Kevin Veen-Birkenbach
|
||||
Consulting & Coaching Solutions
|
||||
https://www.veen.world
|
||||
galaxy_tags:
|
||||
- docker
|
||||
- akaunting
|
||||
- accounting
|
||||
- automation
|
||||
- docker-compose
|
||||
repository: https://s.veen.world/cymais
|
||||
issue_tracker_url: https://s.veen.world/cymaisissues
|
||||
documentation: https://s.veen.world/cymais
|
||||
logo:
|
||||
class: "fa-solid fa-file-invoice-dollar"
|
||||
run_after:
|
||||
- web-app-matomo
|
||||
- web-app-keycloak
|
||||
- web-app-mailu
|
5
roles/web-app-akaunting/meta/schema.yml
Normal file
5
roles/web-app-akaunting/meta/schema.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
credentials:
|
||||
setup_admin_password:
|
||||
description: "Initial admin user password for Akaunting"
|
||||
algorithm: "sha256"
|
||||
validation: "^[a-f0-9]{64}$"
|
25
roles/web-app-akaunting/tasks/main.yml
Normal file
25
roles/web-app-akaunting/tasks/main.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
- name: "include service-rdbms-central"
|
||||
include_role:
|
||||
name: service-rdbms-central
|
||||
|
||||
- name: "include role webserver-proxy-domain for {{application_id}}"
|
||||
include_role:
|
||||
name: webserver-proxy-domain
|
||||
vars:
|
||||
domain: "{{ domains | get_domain(application_id) }}"
|
||||
http_port: "{{ ports.localhost.http[application_id] }}"
|
||||
|
||||
- name: "include tasks update-repository-with-files.yml"
|
||||
include_tasks: update-repository-with-files.yml
|
||||
vars:
|
||||
detached_files:
|
||||
- "docker-compose.yml"
|
||||
|
||||
- name: "create {{docker_compose.files.env}}"
|
||||
template:
|
||||
src: "env.j2"
|
||||
dest: "{{docker_compose.files.env}}"
|
||||
mode: '770'
|
||||
force: yes
|
||||
notify: docker compose up
|
21
roles/web-app-akaunting/templates/docker-compose.yml.j2
Normal file
21
roles/web-app-akaunting/templates/docker-compose.yml.j2
Normal file
@@ -0,0 +1,21 @@
|
||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||
application:
|
||||
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
|
||||
image: "{{ applications[application_id].images[application_id] }}"
|
||||
build:
|
||||
context: .
|
||||
ports:
|
||||
- 127.0.0.1:{{ports.localhost.http[application_id]}}:80
|
||||
volumes:
|
||||
- data:/var/www/html
|
||||
environment:
|
||||
- AKAUNTING_SETUP
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
|
||||
|
||||
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||
data:
|
||||
|
||||
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
22
roles/web-app-akaunting/templates/env.j2
Normal file
22
roles/web-app-akaunting/templates/env.j2
Normal file
@@ -0,0 +1,22 @@
|
||||
# You should change this to match your reverse proxy DNS name and protocol
|
||||
APP_URL={{ domains | get_url(application_id, web_protocol) }}
|
||||
LOCALE={{ HOST_LL }}
|
||||
|
||||
# Don't change this unless you rename your database container or use rootless podman, in case of using rootless podman you should set it to 127.0.0.1 (NOT localhost)
|
||||
DB_HOST={{database_host}}
|
||||
|
||||
# Change these to match env/db.env
|
||||
DB_DATABASE={{database_name}}
|
||||
DB_USERNAME={{database_username}}
|
||||
DB_PASSWORD={{database_password}}
|
||||
|
||||
# You should change this to a random string of three numbers or letters followed by an underscore
|
||||
DB_PREFIX=asd_
|
||||
|
||||
# These define the first company to exist on this instance. They are only used during setup.
|
||||
COMPANY_NAME={{applications[application_id].company_name}}
|
||||
COMPANY_EMAIL={{applications[application_id].company_email}}
|
||||
|
||||
# This will be the first administrative user created on setup.
|
||||
ADMIN_EMAIL={{applications.akaunting.setup_admin_email}}
|
||||
ADMIN_PASSWORD={{applications[application_id].credentials.setup_admin_password}}
|
19
roles/web-app-akaunting/vars/configuration.yml
Normal file
19
roles/web-app-akaunting/vars/configuration.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
images:
|
||||
akaunting: "docker.io/akaunting/akaunting:latest"
|
||||
company_name: "{{primary_domain}}"
|
||||
company_email: "{{ users.administrator.email }}"
|
||||
setup_admin_email: "{{ users.administrator.email }}"
|
||||
features:
|
||||
matomo: true
|
||||
css: true
|
||||
portfolio_iframe: true
|
||||
central_database: true
|
||||
domains:
|
||||
canonical:
|
||||
- "accounting.{{ primary_domain }}"
|
||||
docker:
|
||||
services:
|
||||
database:
|
||||
enabled: true
|
||||
credentials: {}
|
||||
|
4
roles/web-app-akaunting/vars/main.yml
Normal file
4
roles/web-app-akaunting/vars/main.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
application_id: "akaunting"
|
||||
database_type: "mariadb"
|
||||
database_password: "{{ applications[application_id]].credentials.database_password }}"
|
||||
docker_repository_address: "https://github.com/akaunting/docker.git"
|
Reference in New Issue
Block a user