npm start, server available under
Quickstart with Docker/Docker Compose
Install Docker and Docker Compose
- First, install docker: https://docs.docker.com/engine/installation/.
- Then, install docker compose: https://docs.docker.com/compose/install/
- Clone the repository and change your working directory:
git clone https://github.com/gnosis/pm-trading-ui.git cd pm-trading-ui
The application is made up of several container images that are linked together using docker-compose. Before running the application, build the images:
docker-compose build --force-rm
Running the Application
Application will run on
This package implements the npm package for pm-js for interaction with prediction markets. See the github repo from gnosis/pm-js
If you're working with pm-js locally, you can add it to your installation like this:
npm i ../pm-js (if your
pm-js repo is in the parent folder) this will npm-link and you're free to make changes there too
Refer to pm-trading-db's repo
- Clone pm-trading-db's repo.
- Go to pm-trading-db/settings/local.py and change the
ETHEREUM_HOSTto your local LAN IP (localhost won't work as this is a docker container).
- Build the image and start the container with
docker-compose build && docker-compose up.
- Enter the docker container with
docker-compose run web bash.
- Inside the docker container run
python manage.py createsuperuserand create a user.
- Login at
localhost:8000/adminwith the created user.
- Create a periodical task with an interval between 5s and 30s.
- Check the docker-output to see if there were any problems reading from the local blockchain.
In order to run this on a local blockchain, install ganache-cli
npm install ganache-cli -g and run ganache-cli like so:
ganache-cli --gasLimit 400000000 -d -h 0.0.0.0
Afterwards, go into your gnosis folder (either
./email@example.com/pm-js/) and run
npm run migrate this will deploy all contracts to Ganache.