diff --git a/delete-tenants.yml b/delete-tenants.yml index c0cb8be..7a32225 100644 --- a/delete-tenants.yml +++ b/delete-tenants.yml @@ -68,3 +68,10 @@ tenant_dir: /var/lib/bijoe/tenants tenants: "{{[tenants_conf['dev-bijoe']]}}" delete_tenant_cmd: "{{venv_py3_bin}}/{{apps['bijoe']['project_name']}}-manage delete_tenant" + + - import_tasks: tasks/delete_tenants.yml + vars: + app: lingo + tenant_dir: /var/lib/lingo/tenants + tenants: "{{[tenants_conf['dev-lingo']]}}" + delete_tenant_cmd: "{{venv_py3_bin}}/{{apps['lingo']['project_name']}}-manage delete_tenant" diff --git a/group_vars/all b/group_vars/all index 8eb3440..6ee9735 100644 --- a/group_vars/all +++ b/group_vars/all @@ -67,6 +67,13 @@ apps: nginx_host_pattern: '~^(.*)welco\.dev\.publik\.love$' project_name: welco server_port: 8052 + lingo: + db_name: lingo + host_pattern: "*lingo.dev.publik.love" + nginx_host_pattern: '~^(.*)lingo\.dev\.publik\.love$' + project_name: lingo + server_port: 8056 + tenants_conf: connexion-authentic: "authentic.dev.publik.love" agent-combo: "agent-combo.dev.publik.love" @@ -78,3 +85,4 @@ tenants_conf: dev-chrono: "chrono.dev.publik.love" dev-bijoe: "bijoe.dev.publik.love" dev-welco: # disabled by default -- could be "welco.dev.publik.love" + dev-lingo: "lingo.dev.publik.love" diff --git a/install.yml b/install.yml index 84937ee..e3ddf0a 100644 --- a/install.yml +++ b/install.yml @@ -12,6 +12,7 @@ - fargo - chrono - bijoe + - lingo - welco - hobo-agent - end diff --git a/roles/app-setup/templates/lingo-settings.j2 b/roles/app-setup/templates/lingo-settings.j2 new file mode 100644 index 0000000..a3cf9fe --- /dev/null +++ b/roles/app-setup/templates/lingo-settings.j2 @@ -0,0 +1,6 @@ +{% extends "app-settings-base.j2" %} + +{% block app_custom_after %} +# disable django-mellon autologin +MELLON_OPENED_SESSION_COOKIE_NAME = None +{% endblock %} diff --git a/roles/base/files/publik-groups.conf b/roles/base/files/publik-groups.conf index 8f7059f..5448642 100644 --- a/roles/base/files/publik-groups.conf +++ b/roles/base/files/publik-groups.conf @@ -1,5 +1,5 @@ [group:django] -programs=authentic2-multitenant,bijoe,chrono,combo,hobo,fargo,passerelle,welco,wcs +programs=authentic2-multitenant,bijoe,chrono,combo,hobo,fargo,lingo,passerelle,welco,wcs [group:uwsgi] -programs=authentic2-multitenant-uwsgi,bijoe-uwsgi,chrono-uwsgi,combo-uwsgi,hobo-uwsgi,fargo-uwsgi,passerelle-uwsgi,welco-uwsgi,wcs-uwsgi \ No newline at end of file +programs=authentic2-multitenant-uwsgi,bijoe-uwsgi,chrono-uwsgi,combo-uwsgi,hobo-uwsgi,fargo-uwsgi,lingo-uwsgi,passerelle-uwsgi,welco-uwsgi,wcs-uwsgi \ No newline at end of file diff --git a/roles/deploy-tenants/templates/cook-recipe.j2 b/roles/deploy-tenants/templates/cook-recipe.j2 index 0145d7c..c4454e6 100644 --- a/roles/deploy-tenants/templates/cook-recipe.j2 +++ b/roles/deploy-tenants/templates/cook-recipe.j2 @@ -62,6 +62,12 @@ "title": "Courrier" }}, {% endif %} + {% if tenants_conf['dev-lingo'] %} + {"create-lingo": { + "url": "https://{{tenants_conf['dev-lingo']}}/", + "title": "Paiements" + }}, + {% endif %} {"set-theme": { "theme": "clapotis-les-canards" }} diff --git a/roles/lingo/tasks/main.yml b/roles/lingo/tasks/main.yml new file mode 100644 index 0000000..66e50ac --- /dev/null +++ b/roles/lingo/tasks/main.yml @@ -0,0 +1,18 @@ +- name: source install lingo + import_tasks: install_source.yml + vars: + repo: "lingo" + repo_dir: "{{ src_dir }}/lingo" + version: "{{lingo_version|default('main')}}" + tags: + - source + +- name: lingo app setup + import_role: + name: app-setup + +- name: lingo nginx setup + import_role: + name: nginx-setup + vars: + app: "{{apps['lingo']}}" diff --git a/roles/lingo/vars/main.yml b/roles/lingo/vars/main.yml new file mode 100644 index 0000000..9ece192 --- /dev/null +++ b/roles/lingo/vars/main.yml @@ -0,0 +1,12 @@ +app_name: lingo +compile_scss: false +compile_translations: true +db_name: "{{apps['lingo']['db_name']}}" +manage_cmd: "{{venv_py3_python}} {{src_dir}}/lingo/manage.py" +nginx_host_pattern: "{{apps['lingo']['nginx_host_pattern']}}" +nginx_template_name: "std-nginx-server.j2" +project_name: "{{apps['lingo']['project_name']}}" +server_port: "{{apps['lingo']['server_port']}}" +settings_env_var: LINGO_SETTINGS_FILE +uwsgi_settings_orig: "{{src_dir}}/{{app_name}}/debian/uwsgi.ini" +virtualenv: "{{venv_py3}}"