Fix self-building for matrix-registration
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1864 Related to https://github.com/zeratax/matrix-registration/issues/93 This is a poor way to do things though. It may break again in the future. matrix-registration is a poorly maintained project and should likely be removed from the playbook.
This commit is contained in:
parent
9740cb6357
commit
646da6d163
|
@ -2,6 +2,8 @@
|
|||
|
||||
The playbook can install and configure [matrix-registration](https://github.com/ZerataX/matrix-registration) for you.
|
||||
|
||||
**WARNING**: this is a poorly maintained and buggy project. It's better to avoid using it.
|
||||
|
||||
> matrix-registration is a simple python application to have a token based matrix registration.
|
||||
|
||||
Use matrix-registration to **create unique registration links**, which people can use to register on your Matrix server. It allows you to **keep your server's registration closed (private)**, but still allow certain people (these having a special link) to register a user account.
|
||||
|
|
|
@ -7,6 +7,10 @@ matrix_registration_enabled: true
|
|||
matrix_registration_container_image_self_build: false
|
||||
matrix_registration_container_image_self_build_repo: "https://github.com/ZerataX/matrix-registration"
|
||||
matrix_registration_container_image_self_build_branch: "{{ 'master' if matrix_registration_version == 'latest' else matrix_registration_version }}"
|
||||
# Controls whether we'll be patching the dependencies in `setup.py` when self-building.
|
||||
# Without patching, building will likely fail, because of the poor unbounded way dependencies are defined (e.g. `flask-limiter>=1.1.0`).
|
||||
# This is an attempt to get matrix-registration in its current (outdated) version to build.
|
||||
matrix_registration_container_image_self_build_python_dependencies_patch_enabled: true
|
||||
|
||||
matrix_registration_base_path: "{{ matrix_base_data_path }}/matrix-registration"
|
||||
matrix_registration_config_path: "{{ matrix_registration_base_path }}/config"
|
||||
|
|
|
@ -68,6 +68,14 @@
|
|||
register: matrix_registration_git_pull_results
|
||||
when: "matrix_registration_container_image_self_build|bool"
|
||||
|
||||
# See: https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1864
|
||||
- name: Patch setup.py to allow self-built version to work
|
||||
lineinfile:
|
||||
path: "{{ matrix_registration_docker_src_files_path }}/setup.py"
|
||||
regexp: 'flask-limiter'
|
||||
line: '"flask-limiter~=1.1.0", "Markupsafe<2.1",'
|
||||
when: "matrix_registration_container_image_self_build|bool and matrix_registration_container_image_self_build_python_dependencies_patch_enabled|bool"
|
||||
|
||||
- name: Ensure matrix-registration Docker image is built
|
||||
docker_image:
|
||||
name: "{{ matrix_registration_docker_image }}"
|
||||
|
|
Loading…
Reference in a new issue