NOTE: This repository is now deprecated, as it has been replaced by the standalone server in this project:
https://github.com/epsilonlabs/playground-backend
This is a dockerized version of the Epsilon Playground.
Use this command to fetch the latest version of the Epsilon Playground image from Docker Hub and run it in a container:
docker run -p 8000:80 eclipseepsilon/playground:latestIf you prefer to build the image from source instead of fetching it from Docker Hub, clone the repository and use this command to build the image:
docker image build -t playground:latest .and this command to run the image in a container:
docker run -p 8000:80 playground:latestShould you need to customise the port that nginx runs on, you can do so through the PORT environment variable (as required by Google Cloud Build):
docker run --env PORT=8020 -p 8000:8020 playground:latestOnce the container is up, go to http://localhost:8000 in your browser to access the playground's web interface.
The dockerized version of the playground comes with the same set of examples as the online version. To start an instance with your own examples on the left hand side, use the following command, replacing <examples-folder-absolute-path> with the absolute path of your examples folder.
docker run -p 8000:80 -v <examples-folder-absolute-path>:/etc/nginx/html/examples playground:latestYour examples folder should contain an examples.json file with at least one example. A sample examples folder with a single example is provided in this repository and more examples are available in the examples folder of Epsilon's website repository.
If you would like to use only the backend services and replace the front-end altogether, you can start an instance using the following command, replacing <front-end-folder-absolute-path> with the absolute path of your custom front-end folder.
docker run -p 8000:80 -v <front-end-folder-absolute-path>:/etc/nginx/html playground:latestYour front-end folder should contain an index.html file. A minimal alternative front-end that you can use as a starting point for developing your custom front-end is available in the miniground folder of this repository.
Run the following command to build a linux/amd64 image (replace x.y.z with the actual version you wish to release)
docker buildx build --no-cache --platform linux/amd64 -t eclipseepsilon/playground:x.y.z .
docker tag eclipseepsilon/playground:x.y.z eclipseepsilon/playground:latest
And then push it to Docker Hub
docker push eclipseepsilon/playground:x.y.z
docker push eclipseepsilon/playground:latest