Robert Kaussow
5d25450872
All checks were successful
continuous-integration/drone/push Build is passing
160 lines
7.3 KiB
Django/Jinja
160 lines
7.3 KiB
Django/Jinja
#jinja2:lstrip_blocks: True
|
|
{{ ansible_managed | comment }}
|
|
version: '2.1'
|
|
|
|
services:
|
|
bitwardenrs:
|
|
container_name: {{ bitwardenrs_container_name }}
|
|
image: {{ bitwardenrs_image }}
|
|
restart: {{ bitwardenrs_restart_policy }}
|
|
ports:
|
|
- {{ bitwardenrs_exposed_ip + ':' if bitwardenrs_exposed_ip is defined else '' }}{{ bitwardenrs_exposed_port }}:8080
|
|
volumes:
|
|
- data:/app/data
|
|
{% if bitwardenrs_extra_hosts | default([]) %}
|
|
extra_hosts:
|
|
{% for host in bitwardenrs_extra_hosts %}
|
|
- {{ '"' + host + '"' }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
environment:
|
|
- BITWARDENRS_DOMAIN={{ bitwardenrs_base_url }}
|
|
- BITWARDENRS_DATABASE_URL=postgresql://{{ bitwardenrs_db_user }}:{{ bitwardenrs_db_password }}@{{ bitwardenrs_db_server }}:{{ bitwardenrs_db_port }}/{{ bitwardenrs_db_name }}?sslmode={{ bitwardenrs_db_ssl_mode }}&sslrootcert={{ bitwardenrs_db_ssl_rootcert }}
|
|
{% if bitwardenrs_templates_folder is defined and bitwardenrs_templates_folder %}
|
|
- BITWARDENRS_TEMPLATES_FOLDER={{ bitwardenrs_templates_folder }}
|
|
{% endif %}
|
|
- BITWARDENRS_RELOAD_TEMPLATES={{ bitwardenrs_reload_templates }}
|
|
- BITWARDENRS_IP_HEADER={{ bitwardenrs_ip_header }}
|
|
- BITWARDENRS_ICON_CACHE_TTL={{ bitwardenrs_icon_cache_ttl }}
|
|
- BITWARDENRS_ICON_CACHE_NEGTTL="{{ bitwardenrs_icon_cache_negttl }}"
|
|
- BITWARDENRS_WEB_VAULT_ENABLED={{ bitwardenrs_web_vault_enabled }}
|
|
- BITWARDENRS_EXTENDED_LOGGING={{ bitwardenrs_extended_logging }}
|
|
- BITWARDENRS_LOG_LEVEL={{ bitwardenrs_log_level }}
|
|
- BITWARDENRS_DISABLE_ICON_DOWNLOAD={{ bitwardenrs_disable_icon_download }}
|
|
- BITWARDENRS_ICON_DOWNLOAD_TIMEOUT={{ bitwardenrs_icon_download_timeout }}
|
|
{% if bitwardenrs_icon_blacklist_regexl is defined and bitwardenrs_icon_blacklist_regexl %}
|
|
- BITWARDENRS_ICON_BLACKLIST_REGEXL={{ bitwardenrs_icon_blacklist_regexl }}
|
|
{% endif %}
|
|
- BITWARDENRS_ICON_BLACKLIST_NON_GLOBAL_IPS={{ bitwardenrs_icon_blacklist_non_global_ips }}
|
|
- BITWARDENRS_DISABLE_2FA_REMEMBER={{ bitwardenrs_disable_2fa_remember }}
|
|
- BITWARDENRS_SIGNUPS_ALLOWED={{ bitwardenrs_signups_allowed }}
|
|
- BITWARDENRS_SIGNUPS_VERIFY={{ bitwardenrs_signups_verify }}
|
|
- BITWARDENRS_SIGNUPS_VERIFY_RESEND_TIME={{ bitwardenrs_signups_verify_resend_time }}
|
|
- BITWARDENRS_SIGNUPS_VERIFY_RESEND_LIMIT={{ bitwardenrs_signups_verify_resend_limit }}
|
|
{% if bitwardenrs_signups_domains_whitelist is defined and bitwardenrs_signups_domains_whitelist %}
|
|
- BITWARDENRS_SIGNUPS_DOMAINS_WHITELIST={{ bitwardenrs_signups_domains_whitelist }}
|
|
{% endif %}
|
|
- BITWARDENRS_INVITATIONS_ALLOWED={{ bitwardenrs_invitations_allowed }}
|
|
{% if bitwardenrs_admin_token is defined and bitwardenrs_admin_token %}
|
|
- BITWARDENRS_ADMIN_TOKEN={{ bitwardenrs_admin_token }}
|
|
{% endif %}
|
|
- BITWARDENRS_PASSWORD_ITERATIONS={{ bitwardenrs_password_iterations }}
|
|
- BITWARDENRS_SHOW_PASSWORD_HINT={{ bitwardenrs_show_password_hint }}
|
|
- BITWARDENRS_AUTHENTICATOR_DISABLE_TIME_DRIFT={{ bitwardenrs_authenticator_disable_time_drift }}
|
|
{% if bitwardenrs_smtp_host is defined and bitwardenrs_smtp_host %}
|
|
- BITWARDENRS_SMTP_HOST={{ bitwardenrs_smtp_host }}
|
|
{% endif %}
|
|
- BITWARDENRS_SMTP_FROM={{ bitwardenrs_smtp_from }}
|
|
- BITWARDENRS_SMTP_FROM_NAME={{ bitwardenrs_smtp_from_name }}
|
|
- BITWARDENRS_SMTP_PORT={{ bitwardenrs_smtp_port }}
|
|
- BITWARDENRS_SMTP_SSL={{ bitwardenrs_smtp_ssl }}
|
|
{% if bitwardenrs_smtp_username is defined and bitwardenrs_smtp_username %}
|
|
- BITWARDENRS_SMTP_USERNAME={{ bitwardenrs_smtp_username }}
|
|
- BITWARDENRS_SMTP_PASSWORD={{ bitwardenrs_smtp_password }}
|
|
{% endif %}
|
|
- BITWARDENRS_SMTP_AUTH_MECHANISM={{ bitwardenrs_smtp_auth_mechanism }}
|
|
- BITWARDENRS_SMTP_TIMEOUT={{ bitwardenrs_smtp_timeout }}
|
|
{% if bitwardenrs_memory_limit is defined %}
|
|
mem_limit: {{ bitwardenrs_memory_limit }}
|
|
{% endif %}
|
|
{% if bitwardenrs_memory_reservation is defined %}
|
|
mem_reservation: {{ bitwardenrs_memory_reservation }}
|
|
{% endif %}
|
|
{% if bitwardenrs_cpu_shares is defined %}
|
|
cpu_shares: {{ bitwardenrs_cpu_shares }}
|
|
{% endif %}
|
|
{% if not bitwardenrs_cap_add | length == 0 %}
|
|
cap_add:
|
|
{% for item in bitwardenrs_cap_add %}
|
|
- {{ item }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if not bitwardenrs_cap_drop | length == 0 %}
|
|
cap_drop:
|
|
{% for item in bitwardenrs_cap_drop %}
|
|
- {{ item }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if not bitwardenrs_security_opt | length == 0 %}
|
|
security_opt:
|
|
{% for item in bitwardenrs_security_opt %}
|
|
- {{ item }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
healthcheck:
|
|
{% for key, value in bitwardenrs_healthcheck.items() %}
|
|
{{ key }}: {{ value }}
|
|
{% endfor %}
|
|
{% if bitwardenrs_pids_limit is defined %}
|
|
pids_limit: {{ bitwardenrs_pids_limit }}
|
|
{% endif %}
|
|
{% if bitwardenrs_ldap_sync_enabled %}
|
|
|
|
bitwardenrs_ldap:
|
|
container_name: {{ bitwardenrs_ldap_container_name }}
|
|
image: {{ bitwardenrs_ldap_image }}
|
|
restart: {{ bitwardenrs_ldap_restart_policy }}
|
|
environment:
|
|
bitwardenrs_ldap_bitwarden_url: "{{ bitwardenrs_ldap_bitwarden_url }}"
|
|
bitwardenrs_ldap_bitwarden_admin_token: "{{ bitwardenrs_ldap_bitwarden_admin_token }}"
|
|
bitwardenrs_ldap_host: "{{ bitwardenrs_ldap_host }}"
|
|
{% if bitwardenrs_ldap_scheme is defined and bitwardenrs_ldap_scheme %}
|
|
bitwardenrs_ldap_scheme: "{{ bitwardenrs_ldap_scheme }}"
|
|
{% endif %}
|
|
bitwardenrs_ldap_ssl: "{{ bitwardenrs_ldap_ssl }}"
|
|
{% if bitwardenrs_ldap_port is defined and bitwardenrs_ldap_port %}
|
|
bitwardenrs_ldap_port: "{{ bitwardenrs_ldap_port }}"
|
|
{% endif %}
|
|
bitwardenrs_ldap_bind_dn: "{{ bitwardenrs_ldap_bind_dn }}"
|
|
bitwardenrs_ldap_bind_password: "{{ bitwardenrs_ldap_bind_password }}"
|
|
bitwardenrs_ldap_search_base_dn: "{{ bitwardenrs_ldap_search_base_dn }}"
|
|
bitwardenrs_ldap_search_filter: "{{ bitwardenrs_ldap_search_filter }}"
|
|
bitwardenrs_ldap_mail_field: "{{ bitwardenrs_ldap_mail_field }}"
|
|
bitwardenrs_ldap_sync_interval_seconds: "{{ bitwardenrs_ldap_sync_interval_seconds }}"
|
|
bitwardenrs_ldap_sync_loop: "{{ bitwardenrs_ldap_sync_loop }}"
|
|
{% if bitwardenrs_ldap_memory_limit is defined %}
|
|
mem_limit: {{ bitwardenrs_ldap_memory_limit }}
|
|
{% endif %}
|
|
{% if bitwardenrs_ldap_memory_reservation is defined %}
|
|
mem_reservation: {{ bitwardenrs_ldap_memory_reservation }}
|
|
{% endif %}
|
|
{% if bitwardenrs_ldap_cpu_shares is defined %}
|
|
cpu_shares: {{ bitwardenrs_ldap_cpu_shares }}
|
|
{% endif %}
|
|
{% if not bitwardenrs_ldap_cap_add | length == 0 %}
|
|
cap_add:
|
|
{% for item in bitwardenrs_ldap_cap_add %}
|
|
- {{ item }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if not bitwardenrs_ldap_cap_drop | length == 0 %}
|
|
cap_drop:
|
|
{% for item in bitwardenrs_ldap_cap_drop %}
|
|
- {{ item }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if not bitwardenrs_ldap_security_opt | length == 0 %}
|
|
security_opt:
|
|
{% for item in bitwardenrs_ldap_security_opt %}
|
|
- {{ item }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if bitwardenrs_ldap_pids_limit is defined %}
|
|
pids_limit: {{ bitwardenrs_ldap_pids_limit }}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
volumes:
|
|
data:
|
|
driver: local
|