-
Notifications
You must be signed in to change notification settings - Fork 0
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
See directions at cerbot.eff.org.
- Log into EC2 instance
- Shutdown running docker images:
cd spoc && sudo docker-compose stop
- Test certbot renewal
sudo certbot renew --dry-run
- Run renewal command
sudo certbot renew
- Copy the latest fullchain{n}.pem to
/home/ubuntu/spoc/config
and rename to fullchain.pem - Copy the latest privkey{n}.pem to
/home/ubuntu/spoc/config
and rename to privkey.pem - Rebuild http image
sudo docker-compose build --no-cache http
- Bring docker environment back-up
sudo docker-compose up -d