The CrossHair playgrund provides Web UI to run CrossHair in a sandbox. Try it out here: https://crosshair-web.org
- Web UI and sandbox for running CrossHair easily and safely
- Simple and nice editor with syntax highlighting and error reporting
- Share snippets with your friends using GitHub Gist
- Run
docker-compose up -d --build
to start an app and Docker for running CrossHair - Run
docker-compose exec docker docker pull -a pschanely/crosshair-playground-sandbox
to pull the latest sandbox images into the container. - Open http://localhost:8080
Package a sandbox:
export VER=0.1 && pushd sandbox/${VER}/ && (pipenv update && pipenv --rm) ; popd
docker build --pull -t pschanely/crosshair-playground-sandbox:${VER} ~/proj/crosshair-playground/sandbox/${VER}/ && docker push pschanely/crosshair-playground-sandbox
Package the frontend & backend:
docker build -f ~/proj/crosshair-playground/app/Dockerfile-prod -t pschanely/crosshair-playground:latest ~/proj/crosshair-playground/app/ && docker push pschanely/crosshair-playground
Deploy a package:
cd crosshair-playground/ && docker-compose pull && docker-compose down && docker-compose up -d && docker-compose exec docker docker pull -a pschanely/crosshair-playground-sandbox
- app: Application server
- app/frontend: Frontend
- sandbox: Docker images for running CrossHair
Name | Type | Required | Description |
---|---|---|---|
DEBUG |
bool | No | Enable debug mode (default: False) |
PORT |
int | No | Port number (default: 8080) |
DOCKER_IMAGES |
list | No | Docker images used by sandbox |
SANDBOX_CONCURRENCY |
int | No | The number of running sandboxes at the same time (default: 3) |
GA_TRACKING_ID |
str | No | A tracking id for Google Analytics. If not specified, Google Analytics is disabled. |
GITHUB_TOKEN |
str | No | A token used to create gists |
MYPY_VERSIONS |
list | No | List of CrossHair versions used by a sandbox |