ansible-nas/roles/cloudcmd/tasks/main.yml

32 lines
1.1 KiB
YAML
Raw Normal View History

2019-10-05 10:53:49 +00:00
---
2021-02-06 08:14:58 +00:00
- name: Create Cloudcmd Directories
2019-10-05 10:53:49 +00:00
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ cloudcmd_data_directory }}"
2021-02-06 08:14:58 +00:00
- name: Create Cloudcmd Docker Container
2019-10-05 10:53:49 +00:00
docker_container:
name: cloudcmd
image: coderaiser/cloudcmd
pull: true
volumes:
- "{{ cloudcmd_data_directory }}:/config:rw"
- "{{ cloudcmd_browse_directory }}:/mnt/fs"
ports:
- "{{ cloudcmd_port }}:8000"
2019-10-05 10:53:49 +00:00
env:
TZ: "{{ ansible_nas_timezone }}"
PUID: "{{ cloudcmd_user_id }}"
PGID: "{{ cloudcmd_group_id }}"
restart_policy: unless-stopped
2021-02-06 08:14:58 +00:00
memory: "{{ cloudcmd_memory }}"
2019-10-05 10:53:49 +00:00
labels:
traefik.enable: "{{ cloudcmd_available_externally }}"
2021-02-06 08:14:58 +00:00
traefik.http.routers.cloudcmd.rule: "Host(`{{ cloudcmd_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.cloudcmd.tls.certresolver: "letsencrypt"
traefik.http.routers.cloudcmd.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.cloudcmd.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
2021-02-06 08:14:58 +00:00
traefik.http.services.cloudcmd.loadbalancer.server.port: "8000"