mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-12-23 02:45:02 +01:00
Added akounting draft
This commit is contained in:
parent
2b63574ec9
commit
deac995a98
@ -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
|
||||
|
7
roles/docker-akounting/handlers/main.yml
Normal file
7
roles/docker-akounting/handlers/main.yml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: setup akounting
|
||||
command:
|
||||
cmd: docker-compose up -d
|
||||
chdir: /home/administrator/docker-compose/akounting/
|
||||
environment:
|
||||
AKAUNTING_SETUP: true
|
2
roles/docker-akounting/meta/main.yml
Normal file
2
roles/docker-akounting/meta/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- native-docker-reverse-proxy
|
21
roles/docker-akounting/tasks/main.yml
Normal file
21
roles/docker-akounting/tasks/main.yml
Normal 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
|
9
roles/docker-akounting/templates/db.env.j2
Normal file
9
roles/docker-akounting/templates/db.env.j2
Normal 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
|
22
roles/docker-akounting/templates/run.env.j2
Normal file
22
roles/docker-akounting/templates/run.env.j2
Normal 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}}
|
Loading…
Reference in New Issue
Block a user