Add SMP server #1

Closed
samsapti wants to merge 4 commits from feature/simplexmq into main
3 changed files with 42 additions and 0 deletions
Showing only changes of commit 33b7bfeec0 - Show all commits

View file

@ -29,6 +29,11 @@ services:
postgres_version: 14-alpine
redis_version: 7-alpine
simplexmq:
domain: smp01.simplex.{{ base_domain }}
volume: "{{ base_volume }}/simplexmq"
version: latest
snowflake:
version: latest

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: '18080' # monerod P2P
- port: '18089' # monerod RPC
- port: '51820' # Wireguard