Skip to content

SPOC on AWS

Jeremy Nelson edited this page Jul 23, 2021 · 4 revisions

The SPOC Verifier Streamlit App and API is deployed to an AWS EC2 Virtual Machine. On the VM, we run three Docker containers, spoc_api_1, spoc_verifier_1, and spoc_http_1 with a mounted Docker volume paper_tei containing the TEI-XML of the papers.

To create the volume on the VM, first extract the papers tar file in the ubuntu user's directory and run the following command:

docker volume create --driver local --opt type=none --opt device=/home/ubuntu/papers_tei --opt o=bind papers_tei

Renewing LetsEncrypt Certificate

See directions at cerbot.eff.org.

  1. Log into EC2 instance
  2. Shutdown running docker images: cd spoc && sudo docker-compose stop
  3. Test certbot renewal sudo certbot renew --dry-run
  4. Run renewal command sudo certbot renew
  5. Copy the latest fullchain{n}.pem to /home/ubuntu/spoc/config and rename to fullchain.pem
  6. Copy the latest privkey{n}.pem to /home/ubuntu/spoc/config and rename to privkey.pem
  7. Rebuild http image sudo docker-compose build --no-cache http
  8. Bring docker environment back-up sudo docker-compose up -d
Clone this wiki locally