1
0
Fork 0

Compare commits

...

3 commits

Author SHA1 Message Date
f7fb7bcd34 fix empty db creation on new installation 2024-10-20 08:49:09 +01:00
20160289e9 don't build unless 'pull' 2024-10-18 16:40:44 +01:00
3fb1b30721 specify an admin user 2024-10-18 16:39:18 +01:00
2 changed files with 16 additions and 2 deletions

View file

@ -1,10 +1,12 @@
---
hedy_base_url: "http://localhost:8080/"
hedy_admin_user: ~
hedy_user_username: hedy
hedy_user_groupname: hedy
hedy_base_path: /home/hedy
hedy_data_path: /home/hedy/data
hedy_data_path: "{{ hedy_base_path }}/data"
# Building. Default is to build on the target. To build elsewhere,
# change host ('localhost' for Ansible host) and perhaps path.

View file

@ -17,8 +17,17 @@
- {path: "{{ hedy_data_path }}", when: true}
when: "item.when | bool"
- name: Ensure database file exists before mounting it
ansible.builtin.copy:
force: false
content: ""
dest: "{{ hedy_data_path }}/dev_database.json"
mode: 0600
owner: "{{ hedy_user_username }}"
group: "{{ hedy_user_groupname }}"
- delegate_to: "{{ hedy_builder_host }}"
when: "hedy_container_image_self_build | bool"
when: "hedy_pull and hedy_container_image_self_build | bool"
become: true
become_user: "{{ hedy_builder_username }}"
block:
@ -27,6 +36,8 @@
- name: Hedy container running
community.docker.docker_container:
name: "hedy"
comparisons:
env: strict
image: "{{ hedy_docker_image }}"
pull: "{{ hedy_pull and hedy_docker_image.endswith(':latest') }}"
restart_policy: unless-stopped
@ -39,3 +50,4 @@
# https://github.com/hedyorg/hedy/wiki/Hedy-Development-Process#environment-variables
fix_for_weblate: "true"
save_snippet_hashes: "true"
ADMIN_USER: "{{ hedy_admin_user|default(omit,omit) }}"