forked from davestephens/ansible-nas
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from anarion80/add_rallly
✨ Add Rallly
- Loading branch information
Showing
11 changed files
with
265 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -602,6 +602,10 @@ | |
tags: | ||
- radarr | ||
|
||
- role: rallly | ||
tags: | ||
- rallly | ||
|
||
- role: rclone | ||
tags: | ||
- rclone | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
rallly_enabled: false | ||
rallly_available_externally: false | ||
|
||
# directories | ||
rallly_data_directory: "{{ docker_home }}/rallly" | ||
|
||
# network | ||
rallly_port: "3018" | ||
rallly_hostname: "rallly" | ||
rallly_network_name: "rallly" | ||
|
||
# specs | ||
rallly_memory: 1g | ||
rallly_db_memory: 1g | ||
|
||
# docker | ||
rallly_container_name: rallly | ||
rallly_image_name: "lukevella/rallly" | ||
rallly_image_version: latest | ||
rallly_db_container_name: rallly-db | ||
rallly_db_image_name: postgres | ||
rallly_db_image_version: 14.2 | ||
rallly_user_id: "1000" | ||
rallly_group_id: "1000" | ||
|
||
# rallly | ||
rallly_postgres_user: rallly | ||
rallly_postgres_password: rallly | ||
rallly_postgres_db: "rallly" | ||
rallly_secret_password: abcdefghijklmnopqrstuvwxyz1234567890 | ||
rallly_next_public_base_url: "https://{{ rallly_hostname }}.{{ ansible_nas_domain }}" | ||
rallly_next_public_app_base_url: "https://{{ rallly_hostname }}.{{ ansible_nas_domain }}" | ||
# A connection string to your Postgres database | ||
rallly_database_url: postgres://{{ rallly_postgres_user }}:{{ rallly_postgres_password }}@{{ rallly_db_container_name }}:5432/{{ rallly_postgres_db }} | ||
|
||
# EMAIL CONFIG (required for sending emails) | ||
|
||
# All outgoing emails will show this email as the sender's email address, which also serves as the support email. | ||
rallly_support_email: "rallly@{{ ansible_nas_domain }}" | ||
# The host address of your SMTP server | ||
rallly_smtp_host: "localhost" | ||
# The port of your SMTP server | ||
rallly_smtp_port: "25" | ||
# Set to "true" if SSL is enabled for your SMTP connection | ||
rallly_smtp_secure: "false" | ||
# The username (if auth is enabled on your SMTP server) | ||
rallly_smtp_user: "" | ||
# The password (if auth is enabled on your SMTP server) | ||
rallly_smtp_pwd: "" | ||
|
||
# OPTIONAL CONFIG | ||
|
||
# Comma separated list of email addresses that are allowed to register and login. | ||
# You can use wildcard syntax to match a range of email addresses. | ||
# Example: "[email protected],[email protected]" or "*@example.com" | ||
rallly_allowed_emails: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Rallly | ||
|
||
Homepage: [https://github.com/lukevella/rallly](https://github.com/lukevella/rallly) | ||
|
||
Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier. | ||
|
||
## Usage | ||
|
||
Set `rallly_enabled: true` in your `inventories/<your_inventory>/group_vars/nas.yml` file. | ||
|
||
rallly web interface can be found at [http://ansible_nas_host_or_ip:3018](http://ansible_nas_host_or_ip:3018). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
provisioner: | ||
inventory: | ||
group_vars: | ||
all: | ||
rallly_enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
- name: Stop | ||
hosts: all | ||
become: true | ||
tasks: | ||
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role" | ||
ansible.builtin.include_role: | ||
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}" | ||
vars: | ||
rallly_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
gather_facts: false | ||
tasks: | ||
- name: Include vars | ||
ansible.builtin.include_vars: | ||
file: ../../defaults/main.yml | ||
|
||
- name: Get rallly db container state | ||
community.docker.docker_container: | ||
name: "{{ rallly_db_container_name }}" | ||
register: result_db | ||
|
||
- name: Get rallly container state | ||
community.docker.docker_container: | ||
name: "{{ rallly_container_name }}" | ||
register: result | ||
|
||
- name: Check if rallly containers are running | ||
ansible.builtin.assert: | ||
that: | ||
- result_db.container['State']['Status'] == "running" | ||
- result_db.container['State']['Restarting'] == false | ||
- result.container['State']['Status'] == "running" | ||
- result.container['State']['Restarting'] == false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
gather_facts: false | ||
tasks: | ||
- name: Include vars | ||
ansible.builtin.include_vars: | ||
file: ../../defaults/main.yml | ||
|
||
- name: Try and stop and remove rallly db | ||
community.docker.docker_container: | ||
name: "{{ rallly_db_container_name }}" | ||
state: absent | ||
register: result_db | ||
|
||
- name: Try and stop and remove rallly | ||
community.docker.docker_container: | ||
name: "{{ rallly_container_name }}" | ||
state: absent | ||
register: result | ||
|
||
- name: Check if rallly is stopped | ||
ansible.builtin.assert: | ||
that: | ||
- not result_db.changed | ||
- not result.changed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../requirements.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
--- | ||
- name: Start Rallly | ||
block: | ||
- name: Create Rallly Directories | ||
ansible.builtin.file: | ||
path: "{{ item }}" | ||
state: directory | ||
with_items: | ||
- "{{ rallly_data_directory }}" | ||
|
||
- name: Create Rallly network | ||
community.docker.docker_network: | ||
name: "{{ rallly_network_name }}" | ||
|
||
- name: Create Rallly Db Docker Container | ||
community.docker.docker_container: | ||
name: "{{ rallly_db_container_name }}" | ||
image: "{{ rallly_db_image_name }}:{{ rallly_db_image_version }}" | ||
pull: true | ||
volumes: | ||
- "{{ rallly_data_directory }}/postgres:/var/lib/postgresql/data:rw" | ||
networks: | ||
- name: "{{ rallly_network_name }}" | ||
network_mode: "{{ rallly_network_name }}" | ||
container_default_behavior: no_defaults | ||
env: | ||
POSTGRES_USER: "{{ rallly_postgres_user }}" | ||
POSTGRES_PASSWORD: "{{ rallly_postgres_password }}" | ||
POSTGRES_DB: "{{ rallly_postgres_db }}" | ||
labels: | ||
traefik.enable: "false" | ||
restart_policy: always | ||
memory: "{{ rallly_db_memory }}" | ||
healthcheck: | ||
test: ['CMD-SHELL', 'pg_isready -U {{ rallly_postgres_user }}'] | ||
interval: 10s | ||
timeout: 5s | ||
retries: 5 | ||
|
||
- name: Create Rallly Docker Container | ||
community.docker.docker_container: | ||
container_default_behavior: no_defaults | ||
name: "{{ rallly_container_name }}" | ||
image: "{{ rallly_image_name }}:{{ rallly_image_version }}" | ||
pull: true | ||
volumes: | ||
- "{{ rallly_data_directory }}/config:/root/.rallly/config:rw" | ||
- "{{ rallly_data_directory }}/storage:/root/.rallly/storage:rw" | ||
networks: | ||
- name: "{{ rallly_network_name }}" | ||
network_mode: "{{ rallly_network_name }}" | ||
ports: | ||
- "{{ rallly_port }}:3000" | ||
env: | ||
NODE_ENV: "production" | ||
SELF_HOSTED: "true" | ||
# A random 32-character secret key used to encrypt user sessions | ||
SECRET_PASSWORD: "{{ rallly_secret_password }}" | ||
# The base url where this instance is accessible, including the scheme. | ||
# Example: https://example.com | ||
NEXT_PUBLIC_BASE_URL: "{{ rallly_next_public_base_url }}" | ||
NEXT_PUBLIC_APP_BASE_URL: "{{ rallly_next_public_app_base_url }}" | ||
# A connection string to your Postgres database | ||
DATABASE_URL: "{{ rallly_database_url }}" | ||
|
||
# EMAIL CONFIG (required for sending emails) | ||
|
||
# All outgoing emails will show this email as the sender's email address, which also serves as the support email. | ||
SUPPORT_EMAIL: "{{ rallly_support_email }}" | ||
# The host address of your SMTP server | ||
SMTP_HOST: "{{ rallly_smtp_host }}" | ||
# The port of your SMTP server | ||
SMTP_PORT: "{{ rallly_smtp_port }}" | ||
# Set to "true" if SSL is enabled for your SMTP connection | ||
SMTP_SECURE: "{{ rallly_smtp_secure }}" | ||
# The username (if auth is enabled on your SMTP server) | ||
SMTP_USER: "{{ rallly_smtp_user }}" | ||
# The password (if auth is enabled on your SMTP server) | ||
SMTP_PWD: "{{ rallly_smtp_pwd }}" | ||
|
||
# OPTIONAL CONFIG | ||
|
||
# Comma separated list of email addresses that are allowed to register and login. | ||
# You can use wildcard syntax to match a range of email addresses. | ||
# Example: "[email protected],[email protected]" or "*@example.com" | ||
ALLOWED_EMAILS: "{{ rallly_allowed_emails }}" | ||
restart_policy: unless-stopped | ||
memory: "{{ rallly_memory }}" | ||
labels: | ||
traefik.enable: "{{ rallly_available_externally | string }}" | ||
traefik.http.routers.rallly.rule: "Host(`{{ rallly_hostname }}.{{ ansible_nas_domain }}`)" | ||
traefik.http.routers.rallly.tls.certresolver: "letsencrypt" | ||
traefik.http.routers.rallly.tls.domains[0].main: "{{ ansible_nas_domain }}" | ||
traefik.http.routers.rallly.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" | ||
traefik.http.services.rallly.loadbalancer.server.port: "3000" | ||
when: rallly_enabled is true | ||
|
||
- name: Stop Rallly | ||
block: | ||
- name: Stop Rallly db | ||
community.docker.docker_container: | ||
name: "{{ rallly_db_container_name }}" | ||
state: absent | ||
|
||
- name: Stop Rallly | ||
community.docker.docker_container: | ||
name: "{{ rallly_container_name }}" | ||
state: absent | ||
when: rallly_enabled is false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: "Rallly" | ||
description: "Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier." | ||
--- | ||
|
||
Homepage: [https://github.com/lukevella/rallly](https://github.com/lukevella/rallly) | ||
|
||
Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier. | ||
|
||
## Usage | ||
|
||
Set `rallly_enabled: true` in your `inventories/<your_inventory>/group_vars/nas.yml` file. | ||
|
||
rallly web interface can be found at [http://ansible_nas_host_or_ip:3018](http://ansible_nas_host_or_ip:3018). |