Add SimpleXMQ

This commit is contained in:
Sam A. 2023-04-21 00:38:03 +02:00
parent 9c9ef9f4c7
commit 5168c2fcf9
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA
3 changed files with 42 additions and 0 deletions

View file

@ -24,6 +24,11 @@ services:
volume: "{{ base_volume }}/samsapti.dev"
version: 1-alpine
simplexmq:
domain: smp01.simplex.{{ base_domain }}
volume: "{{ base_volume }}/simplexmq"
version: latest
searxng:
domain: search.{{ base_domain }}
onion: gbat2pbpg7ys3fi3pbp64667tt5x66mg45xok35bxdw7v55brm7a27yd.onion

View file

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

View file

@ -9,6 +9,7 @@
- port: '22' # SSH
- port: '80' # HTTP
- port: '443' # HTTPS
- port: '5223' # SimpleXMQ
- port: '10000' # Jitsi Videobridge
proto: udp