A scalable, distributed system for extracting and transforming LibreTexts content into various export formats.
Shapeshift services are split into two containers, shapeshift-api and shapeshift-processor, which use MySQL for job data storage.
If you want to start an ephermeral MySQL container for development, you can do so with:
# Start
docker compose -f docker-compose-mysql.dev.yml up -d
# Stop
docker compose -f docker-compose-mysql.dev.yml downIf you have an existing local MySQL installation, you can connect to it by adding:
extra_hosts:
- "host.docker.internal:host-gateway"to each service in docker-compose.dev.yaml and then setting the DB_HOST variable to host.docker.internal.
After MySQL is set up, start/stop the stack with:
# Start
docker compose -f docker-compose.dev.yaml up -d
# Stop
docker compose -f docker-compose.dev.yaml downYou can use the run-dev-build.sh script to build and start the API and Processor containers with your local changes. The first build may take a few moments; subsequent builds will be faster.
./run-dev-build.shUse Control-C to stop the containers.
LocalStack can be used to emulate AWS services (like SQS and Secrets Manager) locally as a
Docker container, allowing you to test the entire job workflow end-to-end. Create a free account and
install the CLI to get started. Set the AWS_REGION,
LOCALSTACK_HOST, and LOCALSTACK_PORT environment variables appropriately. Test data is stored on your machine unless
the Cloud Pods feature is used.
curl --request POST \
--url http://localhost:80/api/v1/job \
--header 'content-type: application/json' \
--data '{"url":"https://dev.libretexts.org/Sandboxes/eaturner_at_ucdavis.edu/Test_Book","highPriority":false}'