Skip to content

Scripts for running Sefaria in Docker containers

Notifications You must be signed in to change notification settings

Webiks/Sefaria-Docker

 
 

Repository files navigation

Sefaria-Docker

These scripts create three containers tied together with docker-compose.
One is a vanilla Redis install, one is a mongo install built with the latest Sefaria data,
and the third is a Python/Django/Node server running the latest Sefaria web code.

The ./build script will fetch the latest data and built the containers.
The ./run script will bring up the containers and provision the local Sefaria web client on 0.0.0.0:8000.

Quick Start

API

  • To fetch data from the Sefaria API browse localhost:8000/api/.
  • An example localhost:8000/api/texts/Berakhot.2a?commentary=1
    will get you the text and all the commentary of "Berakhot" book, page 2, sub-page "b".
  • For more examples import sefaria api.postman_collection.json to Postman.

Upload Images to AWS ECR

  • Run:
    ./aws_push.sh

Run Containers in AWS EC2

  • Copy docker-compose.cloud.yml and local_settings.py to the EC2 machine.
    • local_settings.py - allow access from any host.
  • Run in EC2 machine:
    docker.compose -f docker-compose.cloud.yml up -d

About

Scripts for running Sefaria in Docker containers

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 82.0%
  • Shell 18.0%