|
|
@ -2,35 +2,36 @@
|
|
|
|
---
|
|
|
|
---
|
|
|
|
- name: Create SimpleXMQ config directory
|
|
|
|
- name: Create SimpleXMQ config directory
|
|
|
|
ansible.builtin.file:
|
|
|
|
ansible.builtin.file:
|
|
|
|
name: "{{ services.simplexmq.volume }}/config"
|
|
|
|
name: "{{ services.smp_server.volume }}/config"
|
|
|
|
owner: root
|
|
|
|
owner: root
|
|
|
|
mode: u=rwx,g=rx,o=rx
|
|
|
|
mode: u=rwx,g=rx,o=rx
|
|
|
|
state: directory
|
|
|
|
state: directory
|
|
|
|
|
|
|
|
|
|
|
|
- name: Create SimpleXMQ logs directory
|
|
|
|
- name: Create SimpleXMQ logs directory
|
|
|
|
ansible.builtin.file:
|
|
|
|
ansible.builtin.file:
|
|
|
|
name: "{{ services.simplexmq.volume }}/logs"
|
|
|
|
name: "{{ services.smp_server.volume }}/logs"
|
|
|
|
owner: root
|
|
|
|
owner: root
|
|
|
|
mode: u=rwx,g=rx,o=rx
|
|
|
|
mode: u=rwx,g=rx,o=rx
|
|
|
|
state: directory
|
|
|
|
state: directory
|
|
|
|
|
|
|
|
|
|
|
|
- name: Create Docker network for SimpleXMQ
|
|
|
|
- name: Create Docker network for SimpleXMQ
|
|
|
|
community.docker.docker_network:
|
|
|
|
community.docker.docker_network:
|
|
|
|
name: simplexmq
|
|
|
|
name: smp-server
|
|
|
|
state: present
|
|
|
|
state: present
|
|
|
|
|
|
|
|
|
|
|
|
- name: Deploy SimpleXMQ Docker container
|
|
|
|
- name: Deploy SimpleXMQ Docker container
|
|
|
|
community.docker.docker_container:
|
|
|
|
community.docker.docker_container:
|
|
|
|
name: simplexmq
|
|
|
|
name: smp-server
|
|
|
|
state: "{{ 'absent' if stop is defined and stop else 'started' }}"
|
|
|
|
state: "{{ 'absent' if stop is defined and stop else 'started' }}"
|
|
|
|
image: simplexchat/simplexmq:{{ services.simplexmq.version }}
|
|
|
|
image: simplexchat/smp-server:{{ services.smp_server.version }}
|
|
|
|
restart_policy: always
|
|
|
|
restart_policy: always
|
|
|
|
|
|
|
|
default_host_ip: ''
|
|
|
|
networks:
|
|
|
|
networks:
|
|
|
|
- name: simplexmq
|
|
|
|
- name: smp-server
|
|
|
|
env:
|
|
|
|
env:
|
|
|
|
addr: "{{ services.simplexmq.domain }}"
|
|
|
|
addr: "{{ services.smp_server.domain }}"
|
|
|
|
volumes:
|
|
|
|
volumes:
|
|
|
|
- "{{ services.simplexmq.volume }}/config:/etc/opt/simplex:rw"
|
|
|
|
- "{{ services.smp_server.volume }}/config:/etc/opt/simplex:rw"
|
|
|
|
- "{{ services.simplexmq.volume }}/logs:/var/opt/simplex:rw"
|
|
|
|
- "{{ services.smp_server.volume }}/logs:/var/opt/simplex:rw"
|
|
|
|
published_ports:
|
|
|
|
published_ports:
|
|
|
|
- 5223:5223/tcp
|
|
|
|
- 5223:5223/tcp
|