Profile
Back to NewsBack
GitHub Trending 3 min
Reader Mode
harvard-lil/perma: Websites change. Perma Links don't.

harvard-lil/perma: Websites change. Perma Links don't.

6 hours ago

Perma - indelible links =====

Perma.cc helps authors and journals create permanent archived citations in their published work.

test status</a> codecov</a>

Connect with Perma.cc

Installation

If you're installing Perma.cc, see the installation section of the developer doc.

Developing in Perma.cc

If you're wrenchin' on Perma.cc, see the developer doc.

Contributing and releases

Open feature and fix PRs against main, the default integration branch. develop is retained as a frozen historical branch; existing PRs targeting it will be moved in coordination with their authors.

Releases use merge-commit promotions from main to staging, then from staging to prod. Merging a promotion deploys that environment; production uses the image already validated on staging. See the release workflow.

License

Dual licensed under the MIT license (below) and GPL license.

MIT License

Copyright (c) 2021 The Harvard Library Innovation Lab

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Request logging

The ECS web process uses lil-request-logging for JSON access records on stdout. ECS delivers these to CloudWatch alongside Django logs. The managed Perma dashboard reads both JSON and older combined access records; durations are displayed in milliseconds.

Access records use service=perma and the tier from APP_CONFIG. The image sets SENTRY_RELEASE=perma@, identifying the built commit for both access logs and Sentry, including Celery errors. The release stays the same when that image moves from staging to production.

Perma's WSGI proxy middleware sets REMOTE_ADDR for Django. The access logger uses Gunicorn's original connection peer so that middleware cannot change which peers are trusted. Only loopback peers may supply the Cloudflare client IP, matching the task-local tunnel and lack of inbound task rules. Django's proxy validation remains unchanged. See the shared library for field and filtering behavior.

Grafana queries must support JSON before deploying this image. Existing ECS GUNICORN_CMD_ARGS text-format settings are harmless with the shared adapter and remain useful for rollback to an older image. Apply the managed dashboard change separately; then verify request records and latency in staging before production promotion.

Chat with me