1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

gitea dokuwiki nginx support

This commit is contained in:
Jerry Vonau 2019-11-28 05:08:43 -06:00
parent 5f9a604e65
commit e71ae36a98
7 changed files with 56 additions and 4 deletions

View file

@ -21,18 +21,30 @@
src: gitea.conf.j2 src: gitea.conf.j2
dest: "/etc/{{ apache_config_dir }}/gitea.conf" dest: "/etc/{{ apache_config_dir }}/gitea.conf"
- name: Enable httpd conf file (debuntu) - name: Enable httpd conf file (apache)
file: file:
src: /etc/{{ apache_config_dir }}/gitea.conf src: /etc/{{ apache_config_dir }}/gitea.conf
dest: /etc/apache2/sites-enabled/gitea.conf dest: /etc/apache2/sites-enabled/gitea.conf
state: link state: link
when: gitea_enabled and is_debuntu when: gitea_enabled and is_debuntu
- name: Remove httpd conf file (OS's other than debuntu) - name: Remove apache httpd conf file (OS's other than debuntu)
file: file:
path: /etc/apache2/sites-enabled/gitea.conf path: /etc/apache2/sites-enabled/gitea.conf
state: absent state: absent
when: not gitea_enabled and is_debuntu when: not gitea_enabled or nginx_enabled
- name: Remove nginx httpd conf file
file:
path: /etc/nginx/conf.d/gitea-nginx.conf
state: absent
when: not gitea_enabled
- name: Enable nginx httpd conf file
template:
src: gitea-nginx.conf.j2
dest: /etc/nginx/conf.d/gitea-nginx.conf
when: gitea_enabled and nginx_enabled
- name: >- - name: >-
Restart Apache ({{ apache_service }}) to {% if gitea_enabled %}enable{% Restart Apache ({{ apache_service }}) to {% if gitea_enabled %}enable{%

View file

@ -0,0 +1,3 @@
location {{ gitea_url }}/ {
proxy_pass http://127.0.0.1:{{ gitea_port }};
}

View file

@ -10,6 +10,9 @@
#roles/sugarizer/tasks/install.yml: when: sugarizer_enabled | bool and not nginx_enabled | bool #roles/sugarizer/tasks/install.yml: when: sugarizer_enabled | bool and not nginx_enabled | bool
#roles/sugarizer/tasks/install.yml: when: sugarizer_enabled | bool and not nginx_enabled | bool #roles/sugarizer/tasks/install.yml: when: sugarizer_enabled | bool and not nginx_enabled | bool
- name: Enable Gitea for Apache
command: a2ensite gitea.conf
- name: Enable Calibre-Web for Apache - name: Enable Calibre-Web for Apache
command: a2ensite calibre-web.conf command: a2ensite calibre-web.conf

View file

@ -108,4 +108,26 @@
file: file:
path: /etc/nginx/conf.d/calibre-web-nginx.conf path: /etc/nginx/conf.d/calibre-web-nginx.conf
state: absent state: absent
when: not calibreweb_enabled | bool when: not calibreweb_enabled
- name: Remove symlink /etc/apache2/sites-enabled/gitea.conf
file:
path: /etc/apache2/sites-enabled/gitea.conf
state: absent
- name: Install /etc/nginx/conf.d/gitea-nginx.conf
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: root
group: root
mode: "{{ item.mode }}"
with_items:
- { src: 'roles/gitea/templates/gitea-nginx.conf.j2', dest: '/etc/nginx/conf.d/gitea-nginx.conf', mode: '0644' }
when: gitea_enabled
- name: Remove nginx support for Gitea
file:
path: /etc/nginx/conf.d/gitea-nginx.conf
state: absent
when: not gitea_enabled

View file

@ -7,6 +7,12 @@
mode: 0644 mode: 0644
when: moodle_enabled when: moodle_enabled
- name: Install /etc/nginx/conf.d/dokuwiki-nginx.conf from template
template:
src: dokuwiki-nginx.conf
dest: /etc/nginx/conf.d/dokuwiki-nginx.conf
when: dokuwiki_enabled
- name: Install /etc/nginx/conf.d/elgg-nginx.conf from template - name: Install /etc/nginx/conf.d/elgg-nginx.conf from template
template: template:
src: elgg-nginx.conf src: elgg-nginx.conf

View file

@ -0,0 +1,3 @@
location {{ dokuwiki_url }} {
proxy_pass http://127.0.0.1:{{ apache_port }}/{{ dokuwiki_url }};
}

View file

@ -338,6 +338,7 @@ azuracast_port_range_prefix: 10
dokuwiki_install: False dokuwiki_install: False
dokuwiki_enabled: False dokuwiki_enabled: False
dokuwiki_url: /wiki
mediawiki_install: False mediawiki_install: False
mediawiki_enabled: False mediawiki_enabled: False
@ -354,6 +355,8 @@ elgg_mysql_password: elgg4kids
# Gitea (lightweight self-hosted "GitHub") from https://gitea.io # Gitea (lightweight self-hosted "GitHub") from https://gitea.io
gitea_install: False gitea_install: False
gitea_enabled: False gitea_enabled: False
gitea_url: /gitea
gitea_port: 61734
# Lokole (email for rural communities) from https://ascoderu.ca # Lokole (email for rural communities) from https://ascoderu.ca
lokole_install: False lokole_install: False