mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Created role docker-compose and refactored attendize, akauntin, openproject
This commit is contained in:
@@ -18,6 +18,8 @@ This guide details the process of setting up Akaunting, a free and online accoun
|
||||
|
||||
## Installation Steps
|
||||
|
||||
@ATTENTION Variable ```#AKAUNTING_SETUP: true``` needs to be set
|
||||
|
||||
### New Manual Setup
|
||||
1. **Navigate to Docker Compose Directory**: Change to the directory containing your Docker Compose files for Akaunting.
|
||||
|
||||
|
@@ -1,9 +0,0 @@
|
||||
---
|
||||
- name: setup akaunting
|
||||
command:
|
||||
cmd: docker-compose -p akaunting up -d --force-recreate
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
environment:
|
||||
#AKAUNTING_SETUP: true
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
@@ -1,2 +1,2 @@
|
||||
dependencies:
|
||||
- nginx-docker-reverse-proxy
|
||||
- docker-compose
|
@@ -2,43 +2,13 @@
|
||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||
include_tasks: nginx-docker-proxy-domain.yml
|
||||
|
||||
- name: register directory
|
||||
stat:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
register: docker_compose_instance_directory_register
|
||||
|
||||
- name: checkout repository
|
||||
ansible.builtin.shell: git checkout .
|
||||
become: true
|
||||
args:
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
when: docker_compose_instance_directory_register.stat.exists
|
||||
|
||||
- name: pull docker repository
|
||||
git:
|
||||
repo: "https://github.com/akaunting/docker.git"
|
||||
dest: "{{docker_compose_instance_directory}}"
|
||||
update: yes
|
||||
notify: setup akaunting
|
||||
become: true
|
||||
register: git_result
|
||||
ignore_errors: true
|
||||
|
||||
- name: Warn if repo is not reachable
|
||||
debug:
|
||||
msg: "Warning: Repository is not reachable."
|
||||
when: git_result.failed
|
||||
|
||||
- name: set akaunting version
|
||||
ansible.builtin.shell: find . -type f -exec sed -i 's/akaunting:latest/akaunting:{{version_akaunting}}/' {} + && find . -type f -exec sed -i 's/version=latest/version={{version_akaunting}}/' {} +
|
||||
become: true
|
||||
args:
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
- name: "include tasks update-repository-with-docker-compose.yml"
|
||||
include_tasks: update-repository-with-docker-compose.yml
|
||||
|
||||
- name: configure db.env
|
||||
template: src=db.env.j2 dest={{docker_compose_instance_directory}}/env/db.env
|
||||
notify: setup akaunting
|
||||
notify: docker compose project setup
|
||||
|
||||
- name: configure run.env
|
||||
template: src=run.env.j2 dest={{docker_compose_instance_directory}}/env/run.env
|
||||
notify: setup akaunting
|
||||
notify: docker compose project setup
|
||||
|
24
roles/docker-akaunting/templates/docker-compose.yml.j2
Normal file
24
roles/docker-akaunting/templates/docker-compose.yml.j2
Normal file
@@ -0,0 +1,24 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
application:
|
||||
image: docker.io/akaunting/akaunting:{{version_akaunting}}
|
||||
build:
|
||||
context: .
|
||||
ports:
|
||||
- 127.0.0.1:{{http_port}}:80
|
||||
volumes:
|
||||
- data:/var/www/html
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- env/run.env
|
||||
environment:
|
||||
- AKAUNTING_SETUP
|
||||
depends_on:
|
||||
- database
|
||||
|
||||
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
||||
|
||||
volumes:
|
||||
data:
|
||||
database:
|
@@ -1,6 +1,10 @@
|
||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}akaunting/"
|
||||
database_instance: "akaunting"
|
||||
database_host: "akaunting-db"
|
||||
database_databasename: "{{database_instance}}"
|
||||
database_username: "admin"
|
||||
database_password: "{{akaunting_database_password}}"
|
||||
docker_compose_project_name: "akaunting"
|
||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||
docker_compose_file_path: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||
docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose-backup.yml"
|
||||
database_instance: "{{docker_compose_project_name}}"
|
||||
database_host: "database"
|
||||
database_databasename: "{{database_instance}}"
|
||||
database_username: "admin"
|
||||
database_password: "{{akaunting_database_password}}"
|
||||
repository_address: "https://github.com/akaunting/docker.git"
|
||||
|
Reference in New Issue
Block a user