implemented first draft of versioned akaunting

This commit is contained in:
Kevin Veen-Birkenbach 2022-09-01 20:33:19 +02:00
parent 05139506d5
commit 72748de2b0
3 changed files with 28 additions and 3 deletions

View File

@ -88,6 +88,9 @@ bash docker-volume-recover.sh akaunting_akaunting-db ${machine_id:0:64} "$backup
```
## todo
- implement build when new akaunting version is set
## Further information
- https://github.com/akaunting/docker
- https://akaunting.com/forum/discussion/installation-update/updating-to-300-failed-cant-manually-update-either

View File

@ -6,16 +6,37 @@
template: src=roles/native-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
notify: restart nginx
- name: register directory
stat:
path: "{{docker_compose_akaunting_path}}"
register: docker_compose_akaunting_path_register
- name: checkout repository
ansible.builtin.shell: git checkout .
become: true
args:
chdir: "{{docker_compose_akaunting_path}}"
when: docker_compose_akaunting_path_register.stat.exists
become: true
- name: pull docker repository
git:
repo: "https://github.com/akaunting/docker.git"
dest: "/home/administrator/docker-compose/akaunting/"
dest: "{{docker_compose_akaunting_path}}"
update: yes
notify: setup akaunting
become: true
- name: set akaunting version
ansible.builtin.shell: find . -type f -exec sed -i 's/akaunting:latest/akaunting:{{akaunting_version}}/' {} + && find . -type f -exec sed -i 's/version=latest/version={{akaunting_version}}/' {} +
become: true
args:
chdir: "{{docker_compose_akaunting_path}}"
- name: configure db.env
template: src=db.env.j2 dest=/home/administrator/docker-compose/akaunting/env/db.env
template: src=db.env.j2 dest={{docker_compose_akaunting_path}}/env/db.env
notify: setup akaunting
- name: configure run.env
template: src=run.env.j2 dest=/home/administrator/docker-compose/akaunting/env/run.env
template: src=run.env.j2 dest={{docker_compose_akaunting_path}}/env/run.env
notify: setup akaunting

View File

@ -0,0 +1 @@
docker_compose_akaunting_path: "/home/administrator/docker-compose/akaunting/"