mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-12-26 12:05:09 +01:00
implemented first draft of versioned akaunting
This commit is contained in:
parent
7b2e8d8169
commit
d6c3994234
@ -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
|
||||
|
@ -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
|
||||
|
1
roles/docker-akaunting/vars/main.yml
Normal file
1
roles/docker-akaunting/vars/main.yml
Normal file
@ -0,0 +1 @@
|
||||
docker_compose_akaunting_path: "/home/administrator/docker-compose/akaunting/"
|
Loading…
Reference in New Issue
Block a user