library/roles/sharelatex: Add some more env variables to handle the load balancer securely.

This commit is contained in:
Andrea Dell'Amico 2018-07-30 18:14:46 +02:00
parent 72882b275c
commit f7615fa798
3 changed files with 9 additions and 2 deletions

View File

@ -11,6 +11,7 @@ sharelatex_hostname: '{{ ansible_fqdn }}'
sharelatex_local_mongodb: False
sharelatex_local_redis: False
sharelatex_local_nginx: False
sharelatex_secure_cookie: False
sharelatex_mongodb_host: 'localhost'
sharelatex_mongodb_db: 'sharelatex'

View File

@ -24,7 +24,7 @@
become: True
become_user: docker
#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 {{ docker_user_home }}/sharelatex/sharelatex-env.sh {{ sharelatex_docker_image }}
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
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
- name: Start the Sharelatex docker container as root

View File

@ -2,8 +2,14 @@ SHARELATEX_MONGO_URL={{ sharelatex_mongodb_url }}
SHARELATEX_REDIS_HOST={{ sharelatex_redis_host }}
SHARELATEX_APP_NAME='{{ sharelatex_app_name }}'
SHARELATEX_SITE_URL={{ sharelatex_site_url }}
SHARELATEX_NAV_TITLE='D4Science ShareLaTeX Service'
SHARELATEX_NAV_TITLE='{{ sharelatex_app_name }}'
SHARELATEX_BEHIND_PROXY='{{ sharelatex_behind_proxy }}'
{% if sharelatex_secure_cookie %}
SHARELATEX_SECURE_COOKIE=true
{% endif %}
{% if sharelatex_session_secret is defined %}
SHARELATEX_SESSION_SECRET={{ sharelatex_session_secret }}
{% endif %}
{% if sharelatex_header_image_url is defined %}
SHARELATEX_HEADER_IMAGE_URL={{ sharelatex_header_image_url }}
{% endif %}