We make our own base container from Debian Stretch with an older version of ConTeXt (in order to stay compatible with the existing code), yet with a more modern Python3 version (in order to be compatible with up-to-date RQ clients).
The OBS-PDF docker container was split into 2 so that the Python code could be updated without requiring the large number of image files to be updated also. This greatly reduced the time required to build and deploy the container.
The smallest EC2 instance I was able to get it to run on successfully is t3.small
. Anything less that that would lock up consistently.
This is the command line used to start the Docker container on the EC2 instance:
docker run --name obs-pdf -p 8080:80 -dit --cpus=1.0 --restart unless-stopped unfoldingWord/obs-pdf:master
For testing and debugging, start the Docker container with this command:
docker run --name obs-pdf --rm -p 8080:80 -it --cpus=0.5 unfoldingWord/obs-pdf:develop bash
For testing and debugging, start the Docker container with this command:
docker run --name obs-pdf --rm -p 8080:80 -it --cpus=0.5 unfoldingWord/obs-pdf:debug bash
Then, inside the container, run these commands to start the application:
cd /
./start_RqApp.sh