This repository has been archived on 2024-02-10. You can view files and clone it, but cannot push or open issues or pull requests.
cpx-ansible/roles/docker_services/tasks/services/simplexmq_xftp.yml

40 lines
1.2 KiB
YAML

# vim: ft=yaml.ansible
---
- name: Create XFTP server volume directories
ansible.builtin.file:
name: "{{ services.simplexmq_xftp.volume }}/{{ dir }}"
owner: root
mode: u=rwx,g=rx,o=rx
state: directory
loop:
- config
- logs
- files
loop_control:
loop_var: dir
- name: Deploy XFTP server Docker container
community.docker.docker_container:
name: xftp-server
state: "{{ 'absent' if down is defined and down else 'started' }}"
restart: "{{ restart is defined and restart }}"
recreate: "{{ recreate is defined and recreate }}"
image: simplexchat/xftp-server:{{ services.simplexmq_xftp.version }}
restart_policy: always
default_host_ip: ''
networks:
- name: tor
aliases:
- xftp-server
env:
ADDR: "{{ services.simplexmq_xftp.domain }}"
QUOTA: "{{ services.simplexmq_xftp.quota }}"
volumes:
- "{{ services.simplexmq_xftp.volume }}/config:/etc/opt/simplex-xftp:rw"
- "{{ services.simplexmq_xftp.volume }}/logs:/var/opt/simplex-xftp:rw"
- "{{ services.simplexmq_xftp.volume }}/files:/srv/xftp:rw"
published_ports:
- 5443:443/tcp
labels:
com.centurylinklabs.watchtower.stop-signal: SIGINT