ansible-nas/tasks/bitwarden.yml

41 lines
1.3 KiB
YAML
Raw Normal View History

- name: Create Bitwarden Directories
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ bitwarden_data_directory }}"
- name: Bitwarden Docker Container
docker_container:
name: bitwarden
image: mprasil/bitwarden:latest
pull: true
ports:
2019-04-10 13:08:06 +00:00
- "19080:80"
- "3012:3012"
volumes:
- "{{ bitwarden_data_directory }}:/data:rw"
env:
SIGNUPS_ALLOWED: "false"
ADMIN_TOKEN: "{{ bitwarden_admin_token }}"
LOG_FILE: "/data/bitwarden.log"
labels:
traefik.backend: "bitwarden"
traefik.web.frontend.rule: "Host:bitwarden.{{ ansible_nas_domain }}"
traefik.enable: "true"
traefik.web.port: "80"
#traefik.web.frontend.headers.customFrameOptionsValue: "ALLOW-FROM http://{{ ansible_nas_domain }}"
#traefik.web.frontend.headers.customFrameOptionsValue: "ALLOW-FROM https://{{ ansible_nas_domain }}"
#traefik.web.frontend.headers.SSLRedirect: "true"
traefik.hub.frontend.rule: "Host:bitwarden.{{ ansible_nas_domain }};Path:/notifications/hub"
traefik.hub.port: "3012"
restart_policy: unless-stopped
#memory: 1g
- name: Bitwarden Backup Container
docker_container:
name: bitwarden-backup
image: bruceforce/bw_backup:latest
pull: true
restart_policy: unless-stopped
volumes_from: bitwarden