-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'refs/remotes/origin/dev' into chore/psy…
…copg3 # Conflicts: # requirements.txt
- Loading branch information
Showing
94 changed files
with
3,294 additions
and
1,779 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# GitHub Actions workflow for validating NGINX configuration files | ||
# https://github.com/jhinch/nginx-linter | ||
name: Lint NGINX config files | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install nginx-linter | ||
run: npm install -g nginx-linter | ||
- name: Run nginx linter | ||
run: nginx-linter --include config/nginx/* --no-follow-includes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Lint shell scripts | ||
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions | ||
# https://github.com/marketplace/actions/shell-linter | ||
name: Lint shell scripts | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
lint_shell: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: azohra/shell-linter@v0.6.0 | ||
with: | ||
severity: 'warning' | ||
exclude-paths: 'LICENSE' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# GitHub Actions workflow for linting the systemd unit files | ||
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions | ||
name: Lint systemd units | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install systemdlint | ||
run: pip install systemdlint==1.* | ||
- name: Lint systemd units | ||
run: systemdlint ./config/systemd/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Contribution guide | ||
|
||
We welcome contributions to SORT! This document outlines the guidelines for contributing to the project. | ||
|
||
# Getting Started | ||
|
||
## Organising work | ||
|
||
Please use the [Kanban board](https://github.com/orgs/RSE-Sheffield/projects/19) to assign tasks. | ||
|
||
# Making changes | ||
|
||
## Proposing changes | ||
|
||
1. [Raise an issue](https://github.com/RSE-Sheffield/SORT/issues/new?template=Blank+issue) clearly describing the problem or user requirements; | ||
2. [Create a branch](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/creating-a-branch-for-an-issue) that is associated with that issue. It can be helpful to prefix the branch name to match the type of changes e.g. `feat/123-my-feature` for features or `docs/my-guide` for documentation, etc. See [Semantic branch names](https://damiandabrowski.medium.com/semantic-branch-names-and-commit-messages-3ac38a6fcbb6). | ||
3. In that branch, make changes that aim to resolve that issue; | ||
4. Create a [draft pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests) (PR) while the changes are being designed; | ||
5. When ready, mark the PR "Ready for review" and request for reviewers to look at the proposed changes; | ||
|
||
## Environments | ||
|
||
There are two main environments: | ||
|
||
- Development (the `dev` branch and the `sort-web-dev` virtual machine) | ||
- Production (the `main` branch and the `sort-web-app` virtual machine) | ||
|
||
## Change process | ||
|
||
Any proposed changes should be proposed in pull requests that would be merged into the `dev` branch. | ||
|
||
```mermaid | ||
graph LR | ||
subgraph Development environment | ||
A(Feature branch) | ||
B{Approve?} | ||
C[Merge feature branch into dev] | ||
D{Approve?} | ||
end | ||
subgraph Production environment | ||
E[Main branch] | ||
end | ||
A --> B | ||
B -- Yes --> C | ||
C --> D | ||
D -- Yes --> E | ||
``` | ||
|
||
so the commit history would look something like this: | ||
|
||
```mermaid | ||
gitGraph | ||
commit id: "Initial commit" | ||
branch dev | ||
branch feat/my-feature | ||
commit id: "Work on feature branch" | ||
checkout dev | ||
merge feat/my-feature id: "Merge into dev" | ||
checkout main | ||
merge dev id: "Merge dev into main" | ||
``` | ||
|
||
# Code of Conduct | ||
|
||
We expect all contributors to follow the SORT [Code of Conduct](CODE_OF_CONDUCT.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Server configuration | ||
|
||
This directory contains configuration files for the production web server. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# nginx configuration file | ||
|
||
# HTTP and SSL certificates | ||
# https://nginx.org/en/docs/http/configuring_https_servers.html | ||
# https://ssl-config.mozilla.org/#server=nginx&version=1.27.3&config=modern&openssl=3.4.0&ocsp=false&guideline=5.7 | ||
|
||
# Gunicorn proxy configuration | ||
# https://docs.gunicorn.org/en/stable/deploy.html#nginx-configuration | ||
|
||
upstream app_server { | ||
# fail_timeout=0 means we always retry an upstream even if it failed | ||
# to return a good HTTP response | ||
# for UNIX domain socket setups | ||
server unix:/run/gunicorn.sock fail_timeout=0; | ||
} | ||
|
||
server { | ||
# https://nginx.org/en/docs/http/ngx_http_core_module.html | ||
listen 443 ssl; | ||
listen [::]:443 ssl; | ||
# Unavailable on nginx versions before 1.25.1 | ||
# https://nginx.org/en/docs/http/ngx_http_v2_module.html | ||
#http2 on; | ||
# SSL options | ||
ssl_certificate /etc/ssl/certs/sort.crt; | ||
ssl_certificate_key /etc/ssl/private/sort.key; | ||
ssl_protocols TLSv1.3; | ||
ssl_ecdh_curve X25519:prime256v1:secp384r1; | ||
ssl_prefer_server_ciphers off; | ||
client_max_body_size 1m; | ||
server_name sort-web-app.shef.ac.uk; | ||
keepalive_timeout 5; | ||
|
||
# /server-status endpoint | ||
# This is used by IT Services to monitor servers using collectd | ||
# https://nginx.org/en/docs/http/ngx_http_stub_status_module.html | ||
# https://www.collectd.org/documentation/manpages/collectd.conf.html | ||
# It's based on Apache mod_status https://httpd.apache.org/docs/2.4/mod/mod_status.html | ||
location = /server-status { | ||
stub_status; | ||
} | ||
|
||
# Serve static files without invoking Python WSGI | ||
location /static/ { | ||
# https://nginx.org/en/docs/http/ngx_http_core_module.html#root | ||
root /var/www/sort; | ||
} | ||
|
||
# Proxy forward to the WSGI Python app | ||
location / { | ||
# Set HTTP headers for the proxied service | ||
# https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_set_header | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_set_header Host $host; | ||
# we don't want nginx trying to do something clever with | ||
# redirects, we set the Host: header above already. | ||
proxy_redirect off; | ||
proxy_pass http://app_server; | ||
} | ||
} |
Oops, something went wrong.