Added draft for attendize

This commit is contained in:
Kevin Veen-Birkenbach 2023-05-29 13:03:57 +02:00
parent 3215e9fd65
commit 55701f1c3c
6 changed files with 130 additions and 0 deletions

View File

@ -173,6 +173,15 @@
vars:
domain: "joomla.{{top_domain}}"
http_port: 8014
- name: setup attendize
hosts: attendize
become: true
roles:
- role: server_docker-attendize
vars:
domain: "tickets.{{top_domain}}"
http_port: 8015
mail_interface_http_port: 8016
- name: setup akaunting hosts
hosts: akaunting
become: true

View File

@ -0,0 +1,13 @@
# Role: server_docker-attendize
This Ansible role sets up Attendize, an open-source ticket selling and event management platform.
## Setup Instructions
```bash
bash ./Makefile setup
```
## Author and License
This role was created by Kevin Veen-Birkenbach (kevin@veen.world) and is distributed under the AGPL v3 License.

View File

@ -0,0 +1,2 @@
dependencies:
- server_native-docker-reverse-proxy

View File

@ -0,0 +1,51 @@
---
- name: receive {{ mail_interface_domain }} certificate
command: certbot certonly --agree-tos --email {{ administrator_email }} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{ mail_interface_domain }}
- name: receive {{ domain }} certificate
command: certbot certonly --agree-tos --email {{ administrator_email }} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{ domain }}
- name: configure {{domain}}.conf
template:
src: roles/server_native-docker-reverse-proxy/templates/domain.conf.j2
dest: /etc/nginx/conf.d/{{domain}}.conf
notify: restart nginx
#- name: configure {{ mail_interface_domain }}.conf
# template:
# src: roles/server_native-docker-reverse-proxy/templates/domain.conf.j2
# dest: /etc/nginx/conf.d/{{ mail_interface_domain }}.conf
# vars:
# http_port: "{{ mail_interface_http_port }}"
# domain: "{{ mail_interface_domain }}"
# notify: restart nginx
- name: register directory
stat:
path: "{{docker_compose_attendize_path}}"
register: docker_compose_attendize_path_register
- name: checkout repository
ansible.builtin.shell: git checkout .
become: true
args:
chdir: "{{docker_compose_attendize_path}}"
when: docker_compose_attendize_path_register.stat.exists
- name: checkout Attendize repository
ansible.builtin.git:
repo: "https://github.com/Attendize/Attendize.git"
dest: "{{docker_compose_attendize_path}}"
version: master
become: true
- name: Warn if repo is not reachable
debug:
msg: "Warning: Repository is not reachable."
when: git_result.failed
- name: create docker-compose.yml file from template
template:
src: docker-compose.yml.j2
dest: "{{docker_compose_attendize_path}}/docker-compose.yml"
mode: 0644

View File

@ -0,0 +1,52 @@
version: '3.2'
services:
web:
image: attendize_web:latest
ports:
- "{{http_port}}:80"
#- "8081:443"
volumes:
- .:/usr/share/nginx/html
- .:/var/www
depends_on:
- database
- maildev
- redis
- worker
env_file:
- ./.env
worker:
image: attendize_worker:latest
depends_on:
- database
- maildev
- redis
volumes:
- .:/usr/share/nginx/html
- .:/var/www
database:
logging:
driver: journald
image: mariadb
restart: always
environment:
MYSQL_DATABASE: "attendize"
MYSQL_USER: "attendize"
MYSQL_PASSWORD: "{{attendize_database_password}}"
MYSQL_ROOT_PASSWORD: "{{attendize_database_password}}"
MARIADB_AUTO_UPGRADE: "1"
volumes:
- database:/var/lib/mysql
healthcheck:
test: "/usr/bin/mysql --user=attendize --password={{attendize_database_password}} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
maildev:
image: maildev/maildev
ports:
- "{{ mail_interface_http_port }}:1080"
redis:
image: redis
volumes:
database:

View File

@ -0,0 +1,3 @@
---
docker_compose_attendize_path: "{{path_docker_compose_files}}attendize/"
mail_interface_domain: "mail.{{domain}}"