This guide provides a full Ansible playbook to deploy Colanode on Debian 10+, Ubuntu LTS, and RHEL 9+ compatible hosts.
Note: Colanode does not provide an official Docker image. This playbook installs from source using Node.js.
- name: Deploy Colanode
hosts: colanode
become: true
vars:
app_root: /opt/colanode
app_port: 3000
tasks:
- name: Install Node.js on Debian/Ubuntu
apt:
name:
- nodejs
- npm
state: present
update_cache: true
when: ansible_os_family == "Debian"
- name: Install Node.js on RHEL family
dnf:
name:
- nodejs
- npm
state: present
when: ansible_os_family == "RedHat"
- name: Clone Colanode repository
git:
repo: https://github.com/colanode/colanode
dest: "{{ app_root }}"
version: main
- name: Install dependencies
command: npm install
args:
chdir: "{{ app_root }}"
- name: Build application
command: npm run build
args:
chdir: "{{ app_root }}"
- name: Create systemd service
copy:
dest: /etc/systemd/system/colanode.service
mode: "0644"
content: |
[Unit]
Description=Colanode Collaboration Suite
After=network.target
[Service]
Type=simple
User=www-data
WorkingDirectory={{ app_root }}
ExecStart=/usr/bin/node {{ app_root }}/dist/index.js
Restart=on-failure
[Install]
WantedBy=multi-user.target
- name: Enable and start Colanode
systemd:
name: colanode
enabled: true
state: started
daemon_reload: true
Any questions?
Feel free to contact us. Find all contact information on our contact page.