mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-26 06:31:04 +01:00
Added draft for attendize
This commit is contained in:
parent
d243b6a32b
commit
c6576c9f9d
@ -173,6 +173,15 @@
|
|||||||
vars:
|
vars:
|
||||||
domain: "joomla.{{top_domain}}"
|
domain: "joomla.{{top_domain}}"
|
||||||
http_port: 8014
|
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
|
- name: setup akaunting hosts
|
||||||
hosts: akaunting
|
hosts: akaunting
|
||||||
become: true
|
become: true
|
||||||
|
13
roles/server_docker-attendize/README.md
Normal file
13
roles/server_docker-attendize/README.md
Normal 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.
|
2
roles/server_docker-attendize/meta/main.yml
Normal file
2
roles/server_docker-attendize/meta/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
dependencies:
|
||||||
|
- server_native-docker-reverse-proxy
|
51
roles/server_docker-attendize/tasks/main.yml
Normal file
51
roles/server_docker-attendize/tasks/main.yml
Normal 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
|
@ -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:
|
3
roles/server_docker-attendize/vars/main.yml
Normal file
3
roles/server_docker-attendize/vars/main.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
docker_compose_attendize_path: "{{path_docker_compose_files}}attendize/"
|
||||||
|
mail_interface_domain: "mail.{{domain}}"
|
Loading…
Reference in New Issue
Block a user