Use apache instead of mbs-frontend
This commit is contained in:
parent
2937f0dd71
commit
ebe8c8ee0b
4 changed files with 29 additions and 13 deletions
|
@ -10,16 +10,8 @@ Alias /robots.txt /var/www/html/robots.txt
|
|||
|
||||
|
||||
# Needs to be above WSGIScriptAlias /
|
||||
# @TODO With this configuration it needs to be accessed via [1] instead of [2]
|
||||
# [1] http://127.0.0.1:8080/module-build-service/module-build-service/1/module-builds/
|
||||
# [2] http://127.0.0.1:8080/module-build-service/1/module-builds/
|
||||
|
||||
WSGIDaemonProcess module-build-service user=mbs group=mbs threads=15 display-name=module-build-service
|
||||
WSGIScriptAlias /module-build-service /usr/share/copr/coprs_frontend/mbs
|
||||
<Location /module-build-service>
|
||||
WSGIProcessGroup module-build-service
|
||||
</Location>
|
||||
|
||||
# http://stackoverflow.com/a/9690110
|
||||
IncludeOptional /etc/httpd/conf/vhost[s]/mbs/mbs.conf
|
||||
|
||||
WSGIDaemonProcess 127.0.0.1 user=copr-fe group=copr-fe threads=15 display-name=other
|
||||
WSGIDaemonProcess api user=copr-fe group=copr-fe threads=15 display-name=api
|
||||
|
|
18
roles/copr/mbs/files/httpd/mbs.conf
Normal file
18
roles/copr/mbs/files/httpd/mbs.conf
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Needs to be above WSGIScriptAlias /
|
||||
# @TODO With this configuration it needs to be accessed via [1] instead of [2]
|
||||
# [1] http://127.0.0.1:8080/module-build-service/module-build-service/1/module-builds/
|
||||
# [2] http://127.0.0.1:8080/module-build-service/1/module-builds/
|
||||
|
||||
WSGIDaemonProcess module-build-service user=mbs group=mbs threads=15 display-name=module-build-service
|
||||
WSGIScriptAlias /module-build-service /opt/module-build-service/mbs.wsgi
|
||||
<Location /module-build-service>
|
||||
WSGIProcessGroup module-build-service
|
||||
</Location>
|
||||
|
||||
<Directory /opt/module-build-service>
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
RewriteEngine On
|
||||
RewriteRule ^/module/(.*)$ /module-build-service/module-build-service/$1 [PT]
|
|
@ -1,2 +1,4 @@
|
|||
- include: "{{ handlers }}/restart_services.yml"
|
||||
|
||||
- name: daemon reload
|
||||
command: systemctl daemon-reload
|
||||
|
|
|
@ -128,9 +128,13 @@
|
|||
- name: Copy mbs.wsgi file
|
||||
copy: src=mbs.wsgi dest=/opt/module-build-service/mbs.wsgi
|
||||
|
||||
# @FIXME Use apache instead
|
||||
- name: Run mbs-frontend
|
||||
shell: nohup mbs-frontend < /dev/null >& /tmp/mbs-frontend.out &
|
||||
- name: Create vhosts directory
|
||||
file: path=/etc/httpd/conf/vhosts/mbs state=directory
|
||||
|
||||
- name: Copy httpd/mbs.conf to vhosts directory
|
||||
copy: src=httpd/mbs.conf dest=/etc/httpd/conf/vhosts/mbs/mbs.conf
|
||||
notify: reload httpd
|
||||
|
||||
|
||||
|
||||
# Only for testing purposes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue