diff --git a/sharelatex/tasks/main.yml b/sharelatex/tasks/main.yml index 2cbb49b9..8886050a 100644 --- a/sharelatex/tasks/main.yml +++ b/sharelatex/tasks/main.yml @@ -15,20 +15,24 @@ - name: Install the docker env file when the container runs as docker template: src=sharelatex-env.sh.j2 dest={{ docker_user_home }}/sharelatex/sharelatex-env.sh owner=docker group=docker when: docker_run_as_docker_user + tags: [ 'docker', 'sharelatex', 'sharelatex_container' ] - name: Install the docker env file when the container runs as root template: src=sharelatex-env.sh.j2 dest=/opt/sharelatex-env.sh when: not docker_run_as_docker_user + tags: [ 'docker', 'sharelatex', 'sharelatex_container' ] - name: Start the Sharelatex docker container as docker user become: True become_user: docker docker_container: name={{ sharelatex_container_name }} volumes={{ sharelatex_host_data_dir }}:{{ sharelatex_container_data_dir }} published_ports={{ sharelatex_container_public_port }}:{{ sharelatex_container_local_port }} env_file={{ docker_user_home }}/sharelatex/sharelatex-env.sh image={{ sharelatex_docker_image }} state=started keep_volumes=yes pull=yes when: docker_run_as_docker_user + tags: [ 'docker', 'sharelatex', 'sharelatex_container' ] - name: Start the Sharelatex docker container as root command: docker run -v {{ sharelatex_host_data_dir }}:{{ sharelatex_container_data_dir }} -p {{ sharelatex_container_public_port }}:{{ sharelatex_container_local_port }} --name={{ sharelatex_container_name }} --env-file /opt/sharelatex-env.sh image={{ sharelatex_docker_image }} when: not docker_run_as_docker_user + tags: [ 'docker', 'sharelatex', 'sharelatex_container' ] when: sharelatex_install tags: [ 'docker', 'sharelatex' ] diff --git a/sharelatex/templates/sharelatex-env.sh.j2 b/sharelatex/templates/sharelatex-env.sh.j2 index 2a709cf4..f37912a8 100644 --- a/sharelatex/templates/sharelatex-env.sh.j2 +++ b/sharelatex/templates/sharelatex-env.sh.j2 @@ -22,13 +22,15 @@ SHARELATEX_LEFT_FOOTER={{ sharelatex_left_footer }} {% if sharelatex_right_footer is defined %} SHARELATEX_RIGHT_FOOTER={{ sharelatex_right_footer }} {% endif %} -{% if sharelatex_email_from is defined %} -SHARELATEX_EMAIL_FROM_ADDRESS="{{ sharelatex_email_from }}" -{% endif %} {% if sharelatex_configure_smtp is defined %} +# This one is mandatory if we want the email settings to work correctly +SHARELATEX_EMAIL_FROM_ADDRESS={{ sharelatex_email_from }} +SHARELATEX_EMAIL_DRIVER=smtp +SHARELATEX_EMAIL_REPLY_TO={{ sharelatex_email_smtp_reply_to | default("") }} SHARELATEX_EMAIL_SMTP_HOST={{ sharelatex_email_smtp_host }} SHARELATEX_EMAIL_SMTP_PORT={{ sharelatex_email_smtp_port | default(587) }} -SHARELATEX_EMAIL_SMTP_SECURE={{ sharelatex_email_smtp_secure | default('true') }} +# Keep it false for port 587, turn to true for port 465 +SHARELATEX_EMAIL_SMTP_SECURE={{ sharelatex_email_smtp_secure | default('false') }} SHARELATEX_EMAIL_SMTP_USER={{ sharelatex_email_smtp_user | default('') }} SHARELATEX_EMAIL_SMTP_PASS={{ sharelatex_email_smtp_pass | default('') }} SHARELATEX_EMAIL_SMTP_TLS_REJECT_UNAUTH={{ sharelatex_email_smtp_tls_reject_unauth | default('true') }} @@ -37,3 +39,15 @@ SHARELATEX_EMAIL_SMTP_IGNORE_TLS={{ sharelatex_email_smtp_ignore_tls | default(' SHARELATEX_CUSTOM_EMAIL_FOOTER="{{ sharelatex_custom_email_footer }}" {% endif %} {% endif %} +{% if sharelatex_restrict_invites_to_existing_accounts is defined %} +# Set to true to limit the invites to already existing users +SHARELATEX_RESTRICT_INVITES_TO_EXISTING_ACCOUNTS={{ sharelatex_restrict_invites_to_existing_accounts }} +{% endif %} +{% if sharelatex_allow_anonymous_rw_sharing is defined %} +# Give non sharelatex users read and write permissions with the share links +#SHARELATEX_ALLOW_ANONYMOUS_READ_AND_WRITE_SHARING={{ sharelatex_allow_anonymous_rw_sharing }} +{% endif %} +{% if sharelatex_allow_public_access is defined %} +# Set to true if you want unauthenticated users view the site +SHARELATEX_ALLOW_PUBLIC_ACCESS={{ sharelatex_allow_public_access }} +{% endif %}