Add SMP server #1

Closed
samsapti wants to merge 4 commits from feature/simplexmq into main
Showing only changes of commit 8e805e2ccc - Show all commits

View file

@ -1,28 +1,27 @@
# vim: ft=yaml.ansible
---
- name: Create SimpleXMQ config directory
- name: Create SMP server volume directories
ansible.builtin.file:
name: "{{ services.smp_server.volume }}/config"
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 SimpleXMQ logs directory
ansible.builtin.file:
name: "{{ services.smp_server.volume }}/logs"
owner: root
mode: u=rwx,g=rx,o=rx
state: directory
- name: Create Docker network for SimpleXMQ
- name: Create Docker network for SMP server
community.docker.docker_network:
name: smp-server
state: present
- name: Deploy SimpleXMQ Docker container
- 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: ''
@ -35,3 +34,5 @@
- "{{ services.smp_server.volume }}/logs:/var/opt/simplex:rw"
published_ports:
- 5223:5223/tcp
labels:
com.centurylinklabs.watchtower.stop-signal: SIGINT