This playbook deploys Coral Talk with Docker Compose on Debian 10+, Ubuntu LTS, and RHEL 9+ systems.
- name: Deploy Coral Talk
hosts: coral-talk
become: true
vars:
coral_root: /opt/coral-talk
coral_port: 8083
tasks:
- name: Install Docker on Debian/Ubuntu
apt:
update_cache: true
name:
- docker.io
- docker-compose-plugin
state: present
when: ansible_os_family == "Debian"
- name: Install Docker on RHEL family
dnf:
name:
- docker
- docker-compose-plugin
state: present
when: ansible_os_family == "RedHat"
- name: Enable and start Docker
service:
name: docker
state: started
enabled: true
- name: Create Coral directory
file:
path: "{{ coral_root }}"
state: directory
mode: "0755"
- name: Write Coral docker-compose file
copy:
dest: "{{ coral_root }}/docker-compose.yml"
mode: "0644"
content: |
services:
coral:
image: coralproject/talk:latest
restart: unless-stopped
ports:
- "{{ coral_port }}:3000"
volumes:
- ./data:/usr/src/app/data
- name: Start Coral stack
command: docker compose up -d
args:
chdir: "{{ coral_root }}"