diff --git a/roles/etebase/tasks/main.yml b/roles/etebase/tasks/main.yml index 0e04c67..2199a6b 100644 --- a/roles/etebase/tasks/main.yml +++ b/roles/etebase/tasks/main.yml @@ -11,6 +11,14 @@ group: "{{ ansible_env['USER'] }}" mode: '640' +- name: Template etebase-server.ini to project directory + template: + src: etebase-server.ini + dest: "{{ etebase_project_dir }}/etebase-server.ini" + owner: "{{ ansible_env['USER'] }}" + group: "{{ ansible_env['USER'] }}" + mode: '644' + - name: "Create directory {{ volumes['etebase_datadir'] }} with correct permissions" file: path: "{{ volumes['etebase_datadir'] }}" diff --git a/roles/etebase/templates/docker-compose.yaml b/roles/etebase/templates/docker-compose.yaml index 02b1445..bb85a9a 100644 --- a/roles/etebase/templates/docker-compose.yaml +++ b/roles/etebase/templates/docker-compose.yaml @@ -6,10 +6,9 @@ services: user: {{ users['etebase'] }}:{{ users['etebase'] }} environment: SERVER: http - ALLOWED_HOSTS: etebase.{{ domain }} AUTO_UPDATE: 'true' - TIME_ZONE: {{ timezone }} ports: - 127.0.0.1:{{ ports['etebase'] }}:3735 volumes: - {{ volumes['etebase_datadir'] }}:/data + - ./etebase-server.ini:/data/etebase-server.ini diff --git a/roles/etebase/templates/etebase-server.ini b/roles/etebase/templates/etebase-server.ini new file mode 100644 index 0000000..ea84207 --- /dev/null +++ b/roles/etebase/templates/etebase-server.ini @@ -0,0 +1,17 @@ +[global] +secret_file = /data/secret.txt +debug = false +static_root = /srv/etebase/static +static_url = /static/ +media_root = /data/media +media_url = /user-media/ +language_code = en-us +time_zone = {{ timezone }} + + +[allowed_hosts] +allowed_host1 = etebase.{{ domain }} + +[database] +engine = django.db.backends.sqlite3 +name = /data/db.sqlite3