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

Merge staging into production - 2024-Jan-12 edition #1257

Merged
merged 162 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
529e613
Source Detail/Edit, Chant List: in sidebar, replace 'image gallery' w…
jacobdgm Dec 18, 2023
69fc5ad
Add automatic cert renewal with lego
dchiller Dec 20, 2023
aeff7ed
Update frequency of certificate renewal cron job
dchiller Dec 20, 2023
567c48e
Run pg_dump in in-container script for backup
dchiller Dec 21, 2023
67451ef
Make `postgres_backup.sh` executable on `postgres` container build
dchiller Dec 21, 2023
437b952
Fixes backup cron commands
dchiller Dec 21, 2023
8103924
Create single backup script
dchiller Dec 21, 2023
aca9824
Merge pull request #1235 from dchiller/i-982-fix-postgres-backups
ahankinson Dec 21, 2023
9978f7d
source_list: Move source title to the left of source siglum
lucasmarchd01 Dec 27, 2023
d723945
Merge pull request #1228 from jacobdgm/1224-image-gallery
lucasmarchd01 Dec 27, 2023
1aff405
add css styling for autocomplete widgets
lucasmarchd01 Dec 27, 2023
5d82553
Source list: Change table column header order
lucasmarchd01 Jan 5, 2024
46ec42d
Change "Fragment" to "Fragment or Fragmented" on source detail page
dchiller Jan 5, 2024
a831ee7
Merge pull request #1243 from DDMAL/i-1242-change-fragment-lang-on-so…
dchiller Jan 5, 2024
cf0c2e6
Merge pull request #1237 from lucasmarchd01/issue-1199
jacobdgm Jan 5, 2024
1ef3ba5
urls: change chant-list uri construction
lucasmarchd01 Jan 5, 2024
b60ed6e
chant detail: reconfigure templates for new chant-list uri
lucasmarchd01 Jan 5, 2024
824cb31
chant list: reconfigure templates for new chant-list uri
lucasmarchd01 Jan 5, 2024
d9408d4
feast detail: reconfigure templates for new chant-list uri
lucasmarchd01 Jan 5, 2024
4015593
source detail: reconfigure templates for new chant-list uri
lucasmarchd01 Jan 5, 2024
09da4ab
source edit: reconfigure templates for new chant-list uri
lucasmarchd01 Jan 5, 2024
90f1b07
test views: reconfigure tests for new chant-list uri
lucasmarchd01 Jan 5, 2024
7c06782
chant list: reconfigure ChantListView for new chant-list uri
lucasmarchd01 Jan 5, 2024
d4bb2e2
urls: change chant-index uri construction
lucasmarchd01 Jan 5, 2024
169dd83
chant list: reconfigure templates for new chant-inventory uri
lucasmarchd01 Jan 5, 2024
5b9cdaa
rename full_index template to full_inventory
lucasmarchd01 Jan 5, 2024
4bcc919
source detail: reconfigure templates for new chant-inventory uri
lucasmarchd01 Jan 5, 2024
5b2d1d2
source edit: reconfigure templates for new chant-inventory uri
lucasmarchd01 Jan 5, 2024
a2410b7
test views: reconfigure tests for new chant-inventory uri
lucasmarchd01 Jan 5, 2024
a80b235
Merge pull request #1236 from lucasmarchd01/issue-1223
jacobdgm Jan 5, 2024
74993bc
chant list: reconfigure ChantInventoryView for new chant-inventory uri
lucasmarchd01 Jan 5, 2024
e0b78a1
Improve loading of chants for index view
ahankinson Jan 10, 2024
3cb00b6
Optimize chant ID lookups
ahankinson Jan 10, 2024
9bf803f
Create provenance_json_export API
jacobdgm Jan 11, 2024
59b7bc8
Create notation_json_export API
jacobdgm Jan 11, 2024
60606ab
Merge pull request #1251 from jacobdgm/564-provenance-notation-apis
jacobdgm Jan 11, 2024
3c5e450
update formatting to comply with Black
jacobdgm Jan 12, 2024
2359daf
NotationJsonTest: update specification in test_keys
jacobdgm Jan 12, 2024
58c1b0b
refactor notation_json_export
jacobdgm Jan 12, 2024
00114b1
ProvenanceJsonTest: update specification in test_keys
jacobdgm Jan 12, 2024
edfe16e
refactor provenance_json_export
jacobdgm Jan 12, 2024
87e951a
remap notation_, provenance_json_export to use get_object_or_404
jacobdgm Jan 12, 2024
6925927
Add path to lego renew command
dchiller Jan 12, 2024
516cf06
Merge pull request #1233 from dchiller/i-870-cert-renew
jacobdgm Jan 12, 2024
9773e12
Actually refactor provenance_json_export to use .get_object_or_404
jacobdgm Jan 12, 2024
66819f3
Merge pull request #1254 from jacobdgm/improve-1251
jacobdgm Jan 12, 2024
a8dbb5e
Merge pull request #1256 from DDMAL/develop
jacobdgm Jan 12, 2024
c459de6
add custom 400 error page
lucasmarchd01 Jan 15, 2024
21d5fd3
add url for chant redirect
lucasmarchd01 Jan 15, 2024
a1ac958
chant list: add chants/ redirect view
lucasmarchd01 Jan 15, 2024
5a01f4d
Source List: remove errant closing anchor tag
jacobdgm Jan 16, 2024
f72715d
Merge pull request #1260 from jacobdgm/source-list-closing-a
jacobdgm Jan 16, 2024
9d06e34
Add certificates to gitignore
dchiller Jan 17, 2024
4770c0c
Update paths to certificates
dchiller Jan 17, 2024
2467ad8
Update cron command for certificate renewal
dchiller Jan 17, 2024
a78aacc
Update ssl_certificate and ssl_certificate_key path in cantusdb.conf …
dchiller Jan 18, 2024
ff8e4b6
refactor notation_json_export
jacobdgm Jan 18, 2024
dfa65a9
refactor provenance_json_export
jacobdgm Jan 18, 2024
cc95df5
Merge pull request #1263 from dchiller/cert-renewal-fixes
jacobdgm Jan 18, 2024
01b4036
Merge pull request #1265 from DDMAL/develop
jacobdgm Jan 18, 2024
7cca782
Add redirect from mass.cantusdatabase.org
dchiller Jan 18, 2024
e35081b
Update certificate renewal job to include mass.cantusdatabase.org
dchiller Jan 18, 2024
9ca6c6e
Merge pull request #1266 from dchiller/mass-subdomain-redirect
jacobdgm Jan 18, 2024
c8f5b1e
Merge pull request #1268 from DDMAL/develop
jacobdgm Jan 18, 2024
2b95b2a
Create path for webroot on nginx container build
dchiller Jan 18, 2024
d0a6e1b
Add path to docker-compose.yml in cert renewal cron job
dchiller Jan 18, 2024
1bd6458
remove unused import statements
lucasmarchd01 Jan 18, 2024
ab66da6
remove errant print statements and fix typing
lucasmarchd01 Jan 18, 2024
41214fe
Merge pull request #1264 from jacobdgm/improve-improve-1251
jacobdgm Jan 19, 2024
209500f
GitHub Actions Broken Link Checker for Production
zhannaklimanova Jan 19, 2024
6091b61
Add `-T` flag to cert renewal cron job
dchiller Jan 19, 2024
fee5e0b
Add -m to cert renewal cron job
dchiller Jan 19, 2024
47b6078
Merge pull request #1270 from dchiller/fix-cert-renewal-cron-cmd
jacobdgm Jan 19, 2024
8908e81
Merge pull request #1272 from DDMAL/broken-link-checker
jacobdgm Jan 19, 2024
7e975e9
Create save_concordances_to_file command
jacobdgm Jan 23, 2024
fa6c811
save_concordances_to_file: improve stdout
jacobdgm Jan 23, 2024
3cc752c
save_concordances_to_file: improve function name
jacobdgm Jan 23, 2024
d8d40c2
add api_cache/ to .gitignore
jacobdgm Jan 23, 2024
7ce3670
refactor save_concordances_to_file
jacobdgm Jan 25, 2024
f32c39e
rename save_concordances_to_file -> update_cached_concordances
jacobdgm Jan 25, 2024
a227ca8
update_cached_concordances: fix bug in chantlink
jacobdgm Jan 25, 2024
a7a0ea0
Add UpdateCachedConcordancesCommandTest
jacobdgm Jan 25, 2024
9716d21
update_cached_concordances: clean up stdout.write
jacobdgm Jan 25, 2024
d18abaf
update_cached_concordances: Clean stdout.write further
jacobdgm Jan 25, 2024
8c855dc
add ujson to requirements.txt
jacobdgm Jan 25, 2024
33b3869
update_cached_concordances: Use ujson.dump instead of json.dump
jacobdgm Jan 25, 2024
7f0859d
update_cached_concordances: use CACHE_DIR while creating FILEPATH
jacobdgm Jan 25, 2024
eff7b0b
Merge pull request #1276 from jacobdgm/1209-concordances-json-to-file
jacobdgm Jan 25, 2024
6f36136
remove break_json.py
jacobdgm Jan 25, 2024
f4db111
parse_link_checker_output.py: update formatting to comply with Black
jacobdgm Jan 25, 2024
c8cb836
remove ijson from requirements
jacobdgm Jan 25, 2024
a1e43f4
remove fixtures-related shell scripts
jacobdgm Jan 25, 2024
9d0daf3
Merge pull request #1277 from jacobdgm/remove-ijson
jacobdgm Jan 25, 2024
b544c17
test_views: Remove superfluous test_chant_with_volpiano_with_no_incipit
jacobdgm Jan 25, 2024
be56951
AjaxSearchBarTest: fix test_cantus_id_search
jacobdgm Jan 25, 2024
c28cacb
views: remove custom error handlers
lucasmarchd01 Jan 25, 2024
53182d7
test views: add tests for chant-list and chant-inventory view redirects
lucasmarchd01 Jan 25, 2024
435a5fc
urls: add chant-index redirect
lucasmarchd01 Jan 25, 2024
e40edc6
urls: remove unused import statement
lucasmarchd01 Jan 25, 2024
5c391bb
Merge pull request #1278 from jacobdgm/clean-up-tests
jacobdgm Jan 26, 2024
de17f14
views: issue permanent redirects for chant-list and chant-inventory
lucasmarchd01 Jan 26, 2024
158d9bf
views: rename redirect to redirect_source_inventory
lucasmarchd01 Jan 26, 2024
9b749a0
urls: chant URI construction to source-inventory
lucasmarchd01 Jan 26, 2024
59a649b
templates: rename to source-inventory
lucasmarchd01 Jan 26, 2024
e9914ad
test views: reconfigure tests to support source-inventory views
lucasmarchd01 Jan 26, 2024
446c443
source views: add SourceInventoryView
lucasmarchd01 Jan 26, 2024
be0a941
docker-compose: Create api_cache volume
jacobdgm Jan 26, 2024
22a5d37
nginx configuration: configure nginx to serve cached concordances
jacobdgm Jan 26, 2024
817e0d6
update update_cached_concordances command to write to api_cache volume
jacobdgm Jan 26, 2024
02e8c22
update cron.txt to run update_cached_concordances daily
jacobdgm Jan 26, 2024
8d7e661
concordances API: Configure Nginx to add a 6h 'expires' response header
jacobdgm Jan 30, 2024
927a912
configure cantusdb.conf for Production
jacobdgm Jan 30, 2024
b154b8f
Merge pull request #1282 from DDMAL/develop
jacobdgm Jan 30, 2024
93d49c8
update_cached_concordances command: Add -d/--directory option
jacobdgm Jan 30, 2024
2206efa
update nginx to cache concordances for 24h after they are created
jacobdgm Jan 30, 2024
45ca71d
Merge remote-tracking branch 'origin/develop' into issue-1202
lucasmarchd01 Jan 31, 2024
2cebb38
fix typing in redirect_chant_list
lucasmarchd01 Jan 31, 2024
e974ff4
update_cached_concordances command: add docstring and comments
jacobdgm Feb 1, 2024
8ac2758
Merge pull request #1280 from jacobdgm/serve-concordances
jacobdgm Feb 1, 2024
5c58eef
update_cached_concordances: clean up --directory flag logic
jacobdgm Feb 1, 2024
5c5f1f9
Merge pull request #1284 from DDMAL/develop
jacobdgm Feb 1, 2024
0c73721
Create config/nginx/conf.d/cantusdb-development.conf
jacobdgm Feb 1, 2024
4a1fd3b
add docker-compose-development.yml
jacobdgm Feb 1, 2024
8d38951
docker-compose-development.yml: Comment out line relating to certific…
jacobdgm Feb 2, 2024
99575da
conf.d/cantusdb-development.conf: replace listen 443 with listen 80
jacobdgm Feb 2, 2024
11e3450
Create conf.d/cantusdb-staging.conf
jacobdgm Feb 2, 2024
000f7ec
Create cron/cron-staging.txt
jacobdgm Feb 2, 2024
13e9174
Merge pull request #1285 from jacobdgm/improve-serve-concordances
jacobdgm Feb 2, 2024
1c3875c
rename conf.d files
jacobdgm Feb 2, 2024
7afecc9
Rename docker-compose-development.yml -> docker-compose.yml.development
jacobdgm Feb 2, 2024
03320b6
docker-compose.yml.development: Uncomment nginx certificates volume
jacobdgm Feb 2, 2024
724b0cf
Add `-T` flag to `docker-compose exec` in `manage.sh`
dchiller Feb 2, 2024
cc9d08e
docker-compose.yml: django container: remove 3000:3000 port mapping
jacobdgm Feb 6, 2024
3634bb3
docker-compose.yml: nginx container: Reset 443:443 port mapping
jacobdgm Feb 6, 2024
11a4d60
Change Postgres config location
dchiller Feb 2, 2024
830ffe6
Add postgres to postgres container command for clarity
dchiller Feb 2, 2024
94cf8ce
Add production and staging versions of docker-compose.yml
jacobdgm Feb 6, 2024
e6c1906
.gitignore: add docker-compose.yml
jacobdgm Feb 6, 2024
abf992d
docker-compose.yml.staging: Remove 3000:3000 port mapping
jacobdgm Feb 6, 2024
7ba3ab9
Create cantusdb.conf.production
jacobdgm Feb 6, 2024
1b8bc42
run git rm on cantusdb.conf, docker-compose.yml
jacobdgm Feb 6, 2024
9a131dd
Add comment to docker-compose.yml.development
jacobdgm Feb 6, 2024
dee9b1b
docker-compose.yml.development: Re-add 443:443 port mapping
jacobdgm Feb 6, 2024
74dad5e
Merge 1269-prod-stag-dev-config into develop
jacobdgm Feb 6, 2024
383f69d
Merge pull request #1297 from jacobdgm/develop
jacobdgm Feb 6, 2024
86ad579
Merge pull request #1298 from DDMAL/develop
jacobdgm Feb 6, 2024
d5321bb
rename cron-staging.txt -> cron.txt.staging
jacobdgm Feb 6, 2024
9197b83
rename cron.txt -> cron.txt.production
jacobdgm Feb 6, 2024
36f9b75
add cron.txt to .gitignore
jacobdgm Feb 6, 2024
aa920f3
Add postgres command with path to config file to docker-compose staging
dchiller Feb 6, 2024
0383346
Merge pull request #1299 from jacobdgm/1269-standardize-cron
jacobdgm Feb 8, 2024
bad5c14
Bump django from 4.2.3 to 4.2.10 in /django/cantusdb_project
dependabot[bot] Feb 8, 2024
9ef6b7b
Merge pull request #1302 from DDMAL/dependabot/pip/django/cantusdb_pr…
jacobdgm Feb 8, 2024
c2891b3
Update docker-compose.yml.development with postgres command including…
dchiller Feb 8, 2024
69ae2f5
Merge pull request #1300 from DDMAL/fix-docker-compose-staging
jacobdgm Feb 8, 2024
08f807e
Merge pull request #1304 from DDMAL/develop
jacobdgm Feb 8, 2024
86616b0
Ensure CSRF_TRUSTED_ORIGINS and ALLOWED_HOSTS are complete and up-to-…
jacobdgm Feb 8, 2024
deb8910
Reconfigure settings.py to read allowed hosts and trusted origins fro…
jacobdgm Feb 8, 2024
9a9507e
Merge pull request #1308 from jacobdgm/1288-allowed-hosts
jacobdgm Feb 9, 2024
cd8b601
Merge branch 'develop' into issue-1202
lucasmarchd01 Feb 9, 2024
57092ca
Merge pull request #1245 from lucasmarchd01/issue-1202
lucasmarchd01 Feb 9, 2024
6b7a782
Merge pull request #1309 from DDMAL/develop
jacobdgm Feb 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/broken-link-checker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Link checker for articles and flatpages on CantusDB

on:
schedule:
- cron: "8 8 * * 0" # Cron job will run at 08h08 UTC time every Sunday

jobs:
get-all-links:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
BASE_URL="https://cantusdatabase.org"
flatpages=$(curl "$BASE_URL/flatpages-list/" | awk '{ gsub (" ", "\",\"", $0); print}')
articles=$(curl "$BASE_URL/articles-list/" | awk '{ gsub (" ", "\",\"", $0); print}')
list="{\"links\": [\"${flatpages}\",\"${articles}\"]}"
echo $list
echo "matrix=$list" >> $GITHUB_OUTPUT
link-Checker:
runs-on: ubuntu-latest
needs: get-all-links
strategy:
fail-fast: false
max-parallel: 4
matrix: ${{fromJson(needs.get-all-links.outputs.matrix)}}
steps:
- uses: actions/checkout@v3
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1.8.0
with:
args: --exclude http:\/\/cantus\.sk.* ${{ matrix.links }}
format: json
output: /tmp/link-checker-output.txt
- name: Curating Link Checker Output
run: |
echo "***Python Version***"
python --version
echo "***Invoking Parsing Script***"
python "$GITHUB_WORKSPACE/scripts/parse_link_checker_output.py" >> $GITHUB_STEP_SUMMARY
echo "***Printing Summary***"
cat $GITHUB_STEP_SUMMARY
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,13 @@ django/media/
.env
venv

# Fixtures
django/cantusdb_project/main_app/fixtures

#
# Configuration files
config/envs/dev_env
.devcontainer/
certificates/
docker-compose.yml
config/nginx/conf.d/cantusdb.conf
cron/cron.txt

# Drupal scripts from old Cantus
django/cantusdb_project/Drupal_scripts
Expand All @@ -119,3 +120,6 @@ django/cantusdb_project/Drupal_scripts

# in case you're working on importing data from a database dump
*.sql

# cached files for APIs
api_cache/
80 changes: 80 additions & 0 deletions config/nginx/conf.d/cantusdb.conf.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# This file is configured for deployment of the CantusDB project in local development.
# When building the project locally, replace the contents of cantusdb.conf with the
# contents of this file.

# server {
# listen 80;
#
# server_tokens off;
#
# location ^~ /.well-known/acme-challenge/ {
# root /var/www/lego;
# }
#
# location / {
# return 301 https://$host$request_uri;
# }
# }

# server {
# # Redirect all https traffic for mass.cantusdatabase.org to cantusdatabase.org
# listen 443 ssl;
#
# server_name mass.cantusdatabase.org;
#
# ssl_certificate /etc/nginx/ssl/live/certificates/cantusdatabase.org.crt;
# ssl_certificate_key /etc/nginx/ssl/live/certificates/cantusdatabase.org.key;
#
# location / {
# return 301 https://cantusdatabase.org$request_uri;
# }
# }

server {
# listen 443 default_server http2 ssl;
listen 80;

# ssl_certificate /etc/nginx/ssl/live/certificates/cantusdatabase.org.crt;
# ssl_certificate_key /etc/nginx/ssl/live/certificates/cantusdatabase.org.key;

location / {
proxy_pass http://django:8000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
}

location /static {
alias /resources/static/;
}
location /media {
alias /resources/media/;
}

location /concordances {
alias /resources/api_cache/concordances.json;
expires modified +24h;
}

location = /style.css {
root /;
}
location = /background.jpg {
root /;
}
location = /CantusLogoSmall.gif {
root /;
}
location = /favicon.ico {
root /;
}

error_page 502 /502.html;
location = /502.html {
root /;
}
error_page 504 /504.html;
location = /504.html {
root /;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,34 @@ server {
server_tokens off;

location ^~ /.well-known/acme-challenge/ {
root /var/www/certbot;
root /var/www/lego;
}

location / {
return 301 https://$host$request_uri;
}
}

server {
# Redirect all https traffic for mass.cantusdatabase.org to cantusdatabase.org
listen 443 ssl;

server_name mass.cantusdatabase.org;

ssl_certificate /etc/nginx/ssl/live/certificates/cantusdatabase.org.crt;
ssl_certificate_key /etc/nginx/ssl/live/certificates/cantusdatabase.org.key;

location / {
return 301 https://cantusdatabase.org$request_uri;
}
}

server {

listen 443 default_server http2 ssl;

ssl_certificate /etc/nginx/ssl/live/cantusdatabase.org/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/cantusdatabase.org/privkey.pem;
ssl_certificate /etc/nginx/ssl/live/certificates/cantusdatabase.org.crt;
ssl_certificate_key /etc/nginx/ssl/live/certificates/cantusdatabase.org.key;

location / {
proxy_pass http://django:8000;
Expand All @@ -32,7 +46,12 @@ server {
location /media {
alias /resources/media/;
}


location /concordances {
alias /resources/api_cache/concordances.json;
expires modified +24h;
}

location = /style.css {
root /;
}
Expand Down
83 changes: 83 additions & 0 deletions config/nginx/conf.d/cantusdb.conf.staging
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
server {
listen 80;

server_tokens off;

location ^~ /.well-known/acme-challenge/ {
root /var/www/lego;
}

location / {
return 301 https://$host$request_uri;
}
}

server {
# Redirect all https traffic for staging-alias.cantusdatabase.org to staging.cantusdatabase.org
# (on Production, this redirects from mass.cantusdatabase.org to cantusdatabase.org.
# The Staging server's subdomain "staging-alias" is analogous to Production's "mass" subdomain.)
listen 443 ssl;

# server_name mass.cantusdatabase.org;
server_name staging-alias.cantusdatabase.org;

# ssl_certificate /etc/nginx/ssl/live/certificates/cantusdatabase.org.crt;
# ssl_certificate_key /etc/nginx/ssl/live/certificates/cantusdatabase.org.key;
ssl_certificate /etc/nginx/ssl/live/certificates/staging.cantusdatabase.org.crt;
ssl_certificate_key /etc/nginx/ssl/live/certificates/staging.cantusdatabase.org.key;

location / {
return 301 https://staging.cantusdatabase.org$request_uri;
}
}

server {

listen 443 default_server http2 ssl;

# ssl_certificate /etc/nginx/ssl/live/certificates/cantusdatabase.org.crt;
# ssl_certificate_key /etc/nginx/ssl/live/certificates/cantusdatabase.org.key;
ssl_certificate /etc/nginx/ssl/live/certificates/staging.cantusdatabase.org.crt;
ssl_certificate_key /etc/nginx/ssl/live/certificates/staging.cantusdatabase.org.key;

location / {
proxy_pass http://django:8000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
}

location /static {
alias /resources/static/;
}
location /media {
alias /resources/media/;
}

location /concordances {
alias /resources/api_cache/concordances.json;
expires modified +24h;
}

location = /style.css {
root /;
}
location = /background.jpg {
root /;
}
location = /CantusLogoSmall.gif {
root /;
}
location = /favicon.ico {
root /;
}

error_page 502 /502.html;
location = /502.html {
root /;
}
error_page 504 /504.html;
location = /504.html {
root /;
}
}
13 changes: 0 additions & 13 deletions cron/cron.txt

This file was deleted.

11 changes: 11 additions & 0 deletions cron/cron.txt.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
######################
# CantusDB Cron Jobs #
######################

# Note: This is set up to run on the production and staging servers. If you want to run it on your local machine, you will need to change the paths.

# min hour day month weekday command
0 4 * * * bash /home/ubuntu/code/CantusDB/cron/postgres/db_backup.sh
10 4 * * * bash /home/ubuntu/code/CantusDB/cron/management/manage.sh update_cached_concordances
40 4 1 * * bash /home/ubuntu/code/CantusDB/cron/management/manage.sh populate_next_chant_fields; bash /home/ubuntu/code/CantusDB/cron/management/manage.sh populate_is_last_chant_in_feast
50 4 * * 7 /usr/local/bin/docker-compose -f /home/ubuntu/code/CantusDB/docker-compose.yml exec -T nginx lego --path /etc/nginx/ssl/live -d cantusdatabase.org -d www.cantusdatabase.org -d mass.cantusdatabase.org -m UPDATE.ME@example.com --http --http.webroot /var/www/lego/ renew --days 45 --renew-hook "nginx -s reload"
11 changes: 11 additions & 0 deletions cron/cron.txt.staging
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
######################
# CantusDB Cron Jobs #
######################

# Note: This is set up to run on the production server. If you want to run it on your local machine, you will need to change the paths.

# min hour day month weekday command
0 4 * * * bash /home/ubuntu/code/CantusDB/cron/postgres/db_backup.sh
10 4 * * * bash /home/ubuntu/code/CantusDB/cron/management/manage.sh update_cached_concordances
40 4 1 * * bash /home/ubuntu/code/CantusDB/cron/management/manage.sh populate_next_chant_fields; bash /home/ubuntu/code/CantusDB/cron/management/manage.sh populate_is_last_chant_in_feast
50 4 * * 7 /usr/local/bin/docker-compose -f /home/ubuntu/code/CantusDB/docker-compose.yml exec -T nginx lego --path /etc/nginx/ssl/live -d staging.cantusdatabase.org -d staging-alias.cantusdatabase.org -m UPDATE.ME@example.com --http --http.webroot /var/www/lego/ renew --days 45 --renew-hook "nginx -s reload"
2 changes: 1 addition & 1 deletion cron/management/manage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
DOCKER_COMPOSE_FILE=/home/ubuntu/code/CantusDB/docker-compose.yml # This is the path to the docker-compose file.
COMMAND=$1 # This is the command to execute.

/usr/local/bin/docker-compose -f $DOCKER_COMPOSE_FILE exec django python manage.py $COMMAND
/usr/local/bin/docker-compose -f $DOCKER_COMPOSE_FILE exec -T django python manage.py $COMMAND
15 changes: 0 additions & 15 deletions cron/postgres/daily.sh

This file was deleted.