Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/hypercorn #424

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ repos:
- id: flake8
args:
- --max-line-length=100
- --per-file-ignores=packit_dashboard/packit_dashboard.wsgi:F401,E402
- --per-file-ignores=packit_dashboard.py:F401,E402
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
hooks:
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ COPY files/ansible/install-deps.yaml files/ansible/
RUN ansible-playbook -vv -c local -i localhost, files/ansible/install-deps.yaml \
&& dnf clean all

COPY packit_dashboard.py packit_dashboard.py
COPY packit_dashboard/ packit_dashboard/
COPY frontend/ frontend/

Expand Down
6 changes: 0 additions & 6 deletions files/ansible/httpd.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
- name: Copy packit_dashboard.wsgi file
copy:
src: /src/packit_dashboard/packit_dashboard.wsgi
dest: /usr/share/packit_dashboard/packit_dashboard.wsgi
mode: 0664

- name: Copy run_httpd.sh
copy:
src: /src/files/scripts/run_httpd.sh
Expand Down
3 changes: 2 additions & 1 deletion files/ansible/install-deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
- python3-requests
- yarnpkg
- "@nodejs:20"
- python3-mod_wsgi
- mod_ssl
state: present

- name: Install pip deps
pip:
name:
- asyncio
- hypercorn
- flask-cors # RPM not in c9s (RHBZ#2100076)
executable: pip3
18 changes: 9 additions & 9 deletions files/scripts/run_httpd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ fi
# https://modwsgi.readthedocs.io/en/master/configuration.html
# For the HSTS policy see
# https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Strict_Transport_Security_Cheat_Sheet.html
exec mod_wsgi-express-3 start-server \
--access-log \
--log-to-terminal \
--https-port 8443 \
--ssl-certificate-file /secrets/fullchain.pem \
--ssl-certificate-key-file /secrets/privkey.pem \
exec hypercorn \
--access-logfile - \
--ca-certs /secrets/fullchain.pem \
--certfile /secrets/privkey.pem \
--bind '0.0.0.0:8443' \
--bind '[::]:8443' \
--server-name ${SERVER_NAME} \
--processes 2 \
--locale "C.UTF-8" \
/usr/share/packit_dashboard/packit_dashboard.wsgi
-w 2 \
--debug \
packit_dashboard.app:app
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
import sys

sys.path.append("/src/")
from packit_dashboard.app import app as application
from packit_dashboard.app import app
Loading