Add SMP server #1

Closed
samsapti wants to merge 4 commits from feature/simplexmq into main
3 changed files with 44 additions and 0 deletions

View file

@ -29,6 +29,11 @@ services:
postgres_version: 14-alpine
redis_version: 7-alpine
smp_server:
domain: smp02.simplex.{{ base_domain }}
volume: "{{ base_volume }}/smp-server"
version: v5
snowflake:
version: latest

View file

@ -0,0 +1,38 @@
# vim: ft=yaml.ansible
---
- name: Create SMP server volume directories
ansible.builtin.file:
name: "{{ services.smp_server.volume }}/{{ dir }}"
owner: root
mode: u=rwx,g=rx,o=rx
state: directory
loop:
- config
- logs
loop_control:
loop_var: dir
- name: Create Docker network for SMP server
community.docker.docker_network:
name: smp-server
state: present
- 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.smp_server.version }}
restart_policy: always
default_host_ip: ''
networks:
- name: smp-server
env:
addr: "{{ services.smp_server.domain }}"
volumes:
- "{{ services.smp_server.volume }}/config:/etc/opt/simplex:rw"
- "{{ services.smp_server.volume }}/logs:/var/opt/simplex:rw"
published_ports:
- 5223:5223/tcp
labels:
com.centurylinklabs.watchtower.stop-signal: SIGINT

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