From 3794d88cb6bf4a9503ac051cbc8cb627a0b27b0b Mon Sep 17 00:00:00 2001 From: Laur Ivan Date: Mon, 9 Jan 2023 16:40:13 +0100 Subject: [PATCH] feat: Mealie works with sqlite. --- defaults/main.yml | 12 +++++++----- tasks/config.yml | 6 +++--- tasks/main.yml | 2 +- templates/docker-compose.yml.j2 | 24 +++++++++++++++++++++++- 4 files changed, 34 insertions(+), 10 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 616d7ff..1ad7673 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,16 +1,18 @@ --- -## General -# Version -mealie_version: 1.0.0 +mealie_docker_version: "latest" +mealie_port: "9925" +mealie_timezone: "Europe/Brussels" -# mealie paths +# Mealie paths mealie_root_path: /opt/mealie mealie_config_path: "{{ mealie_root_path }}/conf" +mealie_data_path: "{{ mealie_root_path }}/data" mealie_skeleton_paths: - "{{ mealie_config_path }}" + - "{{ mealie_data_path }}" # Documentation -mealie_documentation_link: "" +mealie_documentation_link: "https://git.laurivan.com/Dev/ansible-role-mealie/src/branch/main/README.md" diff --git a/tasks/config.yml b/tasks/config.yml index 0871b0e..b94731d 100644 --- a/tasks/config.yml +++ b/tasks/config.yml @@ -7,15 +7,15 @@ group: "{{ ansible_effective_group_id }}" mode: "0750" with_items: - - "}} mealie_skeleton_paths }}" + - "{{ mealie_skeleton_paths }}" tags: - mealie_configure become: true - name: "MEALIE | Write configuration files" ansible.builtin.template: - src: "}} item }}.j2" - dest: "}} cookiecutter.app_name }}_config_path | expanduser | realpath }}/}} item }}" + src: "{{ item }}.j2" + dest: "{{ mealie_config_path | expanduser | realpath }}/{{ item }}" mode: '0640' loop: - "docker-compose.yml" diff --git a/tasks/main.yml b/tasks/main.yml index fa48057..e976d46 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -5,7 +5,7 @@ tags: - mealie_configure -- name:" MEALIE | Install" +- name: "MEALIE | Install" import_tasks: install.yml tags: - mealie_install diff --git a/templates/docker-compose.yml.j2 b/templates/docker-compose.yml.j2 index 94bcb7c..2d66bf8 100644 --- a/templates/docker-compose.yml.j2 +++ b/templates/docker-compose.yml.j2 @@ -1,3 +1,25 @@ # mealie docker compose -version: '3.9' +version: "3.1" services: + mealie: + image: hkotel/mealie:latest + restart: always + ports: + - "{{ mealie_port }}:80" + environment: + TZ: "{{ mealie_timezone }}" + + # Default Recipe Settings + RECIPE_PUBLIC: 'true' + RECIPE_SHOW_NUTRITION: 'true' + RECIPE_SHOW_ASSETS: 'true' + RECIPE_LANDSCAPE_VIEW: 'true' + RECIPE_DISABLE_COMMENTS: 'false' + RECIPE_DISABLE_AMOUNT: 'false' + + # Gunicorn + # WEB_CONCURRENCY: 2 + # WORKERS_PER_CORE: 0.5 + # MAX_WORKERS: 8 + volumes: + - "{{ mealie_data_path }}:/app/data" \ No newline at end of file