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_smp.yml

36 lines
1 KiB
YAML

# vim: ft=yaml.ansible
---
- name: Create SMP server volume directories
ansible.builtin.file:
name: "{{ services.simplexmq_smp.volume }}/{{ dir }}"
owner: root
mode: u=rwx,g=rx,o=rx
state: directory
loop:
- config
- logs
loop_control:
loop_var: dir
- name: Deploy SMP server Docker container
community.docker.docker_container:
name: smp-server
state: "{{ 'absent' if stop is defined and stop else 'started' }}"
restart: "{{ stop is undefined or not stop }}"
image: simplexchat/smp-server:{{ services.simplexmq_smp.version }}
restart_policy: always
default_host_ip: ''
networks:
- name: tor
aliases:
- smp-server
env:
addr: "{{ services.simplexmq_smp.domain }}"
volumes:
- "{{ services.simplexmq_smp.volume }}/config:/etc/opt/simplex:rw"
- "{{ services.simplexmq_smp.volume }}/logs:/var/opt/simplex:rw"
published_ports:
- 5223:5223/tcp
labels:
com.centurylinklabs.watchtower.stop-signal: SIGINT