ansible-nas/tasks/bitwarden.yml

41 lines
1.2 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:
- "{{ bitwarden_port_a }}:80"
- "{{ bitwarden_port_b }}:3012"
volumes:
- "{{ bitwarden_data_directory }}:/data:rw"
env:
SIGNUPS_ALLOWED: "{{ bitwarden_allow_signups }}"
2019-04-10 14:28:35 +00:00
ADMIN_TOKEN: "{{ bitwarden_admin_token }}"
LOG_FILE: "/data/bitwarden.log"
2019-04-14 15:45:48 +00:00
WEBSOCKET_ENABLED: "true"
labels:
traefik.web.frontend.rule: "Host:bitwarden.{{ ansible_nas_domain }}"
2019-04-14 16:05:21 +00:00
traefik.enable: "{{ bitwarden_available_externally }}"
traefik.web.port: "80"
2019-04-14 15:45:48 +00:00
traefik.hub.frontend.rule: "Host:bitwarden.{{ ansible_nas_domain }};Path:/notifications/hub"
traefik.hub.port: "bitwarden_port_b"
2019-04-14 15:45:48 +00:00
traefik.hub.protocol: "ws"
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
2019-04-10 20:55:14 +00:00
volumes_from: bitwarden
2019-08-21 19:45:30 +00:00
memory: 1g