Added akounting draft

This commit is contained in:
Kevin Veen-Birkenbach 2022-01-18 19:08:45 +01:00
parent 2b63574ec9
commit deac995a98
6 changed files with 69 additions and 0 deletions

View File

@ -112,3 +112,11 @@
vars:
domain: "elk.{{top_domain}}"
http_port: 8008
- name: setup akounting hosts
hosts: akounting_hosts
become: true
roles:
- role: docker-akounting
vars:
domain: akounting.{{top_domain}}
http_port: 8080

View File

@ -0,0 +1,7 @@
---
- name: setup akounting
command:
cmd: docker-compose up -d
chdir: /home/administrator/docker-compose/akounting/
environment:
AKAUNTING_SETUP: true

View File

@ -0,0 +1,2 @@
dependencies:
- native-docker-reverse-proxy

View File

@ -0,0 +1,21 @@
---
- name: recieve {{domain}} certificate
command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{domain}}
- name: configure {{domain}}.conf
template: src=roles/native-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
notify: restart nginx
- name: pull docker repository
git:
repo: "https://github.com/akaunting/docker.git"
dest: "/home/administrator/docker-compose/akaunting/"
update: yes
- name: configure db.env
template: src=db.env.j2 dest=/home/administrator/docker-compose/akaunting/env/db.env
notify: setup akounting
- name: configure run.env
template: src=run.env.j2 dest=/home/administrator/docker-compose/akaunting/env/run.env
notify: setup akounting

View File

@ -0,0 +1,9 @@
# These could be changed
MYSQL_DATABASE=akaunting
MYSQL_USER=admin
# This should definitely be changed to something long and random
MYSQL_PASSWORD={{akaunting_database_password}}
# You should probably leave this
MYSQL_RANDOM_ROOT_PASSWORD=yes

View File

@ -0,0 +1,22 @@
# You should change this to match your reverse proxy DNS name and protocol
APP_URL=https://akaunting.example.com
LOCALE=en-US
# 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=akaunting-db
# Change these to match env/db.env
DB_DATABASE=akaunting
DB_USERNAME=admin
DB_PASSWORD={{akaunting_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={{akaunting_company_name}}
COMPANY_EMAIL={{akaunting_company_email}}
# This will be the first administrative user created on setup.
ADMIN_EMAIL={{akaunting_admin_email}}
ADMIN_PASSWORD={{akaunting_setup_admin_password}}