Skip to content

Microservice to re-direct requests for validly-formed GUIDS to Perma.

Notifications You must be signed in to change notification settings

harvard-lil/perma-redirector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A microservice to re-direct requests for validly-formed GUIDS to Perma.

Why?

Some early adopters of Perma participated in a beta program in which they used and cited Perma not at perma.cc, but at their own custom domain. The program was ended and custom domains are no longer supported, but we maintain this redirection service to help prevent those early adopters' citations from rotting: using a DNS CNAME record, they can point their custom domains to this service.

Local development

Increment the image tag in docker-compose.yml

Run docker-compose up to build the container (or docker-compose up --build to subsequently force a rebuild).

Deployment

This microservice is currently deployed at fly.io. I decided to have fly deploy from a built image available from the LIL registry, rather than having it re-build the image itself during deployment using the Dockerfile. To be discussed: that may be unnecessarily complicated.

To redeploy:

Push the image to the LIL registry:

docker push registry.lil.tools/harvardlil/perma-redirector:0.x

Update the tag in fly.toml:

[build]
  image = "registry.lil.tools/harvardlil/perma-redirector:0.x"

Run flyctl deploy.

SSL

I ran flyctl certs create custom.perma.cc to get SSL working. I have no idea if that will keep working in perpetuity, or if we have to renew occasionally... but I think it should just work.

The certificate for custom.perma.cc has been issued.

Hostname                  = custom.perma.cc

DNS Provider              = cloudflare

Certificate Authority     = Let's Encrypt

Issued                    = ecdsa,rsa

Added to App              = 1 minute ago

Source                    = fly

About

Microservice to re-direct requests for validly-formed GUIDS to Perma.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published