Data flow in the Tor network
Requires Docker, node, bower, and gulp.
Install server-side modules:
npm installInstall client-side modules:
cd public
bower install
gulp installUp the database container:
cd containers/
docker-compose up -dEdit config.js to point to your MySQL database if you're running without the local containerized database.
Ingest data into MySQL via the bin/ingest node script. There is a set of sample data in the ./data/sample folder. To import this into your database:
node bin/ingest data/sampleStart the server:
npm startThe application will be available in your browser at http://localhost:3000/
gulp buildThe "torflow" app container will run the application, and connect to an external MySQL database. The "config.js" configuration file build into the container will specify the connection parameters.
Build the app container:
cd /deploy/app
docker build -t docker.uncharted.software/torflow .Run the app container:
docker run -ti --rm --name torflow -v /logs/:/var/log/supervisor/ -p 3000:3000 docker.uncharted.software/torflowOr up it in the test docker-compose stack:
cd containers/
docker-compose -f docker-compose-test.yaml upIf your container config.js points at a MySQL server that can't be resolved, you can add a hosts entry at run-time using the Docker parameter --add-host.
The "torflow-ingest" container will run the ingest program described above, ingesting whatever data is mounted at the command-line below. It will use the "config.js" configuration file built into the container.
Build the ingest container:
cd /deploy/ingest
docker build -t docker.uncharted.software/torflow-ingest .Run the ingest container:
docker run -ti --rm --name torflow-ingest -v /torflow/data/sample/:/torflow/data docker.uncharted.software/torflow-ingestThis assumes you are importing the sample data in the /torflow/data/sample folder. If your container config.js points at a MySQL server that can't be resolved, you can add a hosts entry at run-time using the Docker parameter --add-host.
The demo container is pre-configured to run against the demo MySQL database, and will automatically ingest the the sample data from the /torflow/data/sample folder. The "config.js" for the demo app, and the "mysql.properties" for the MySQL server, are already configured to match each other. If you change one, you need to update the other.
Run the MySQL container:
docker run -ti --rm --name torflow-mysql -p 3306:3306 --env-file mysql.properties mysql:5.7Build the demo container:
cd /deploy/demo
docker build -t docker.uncharted.software/torflow-demo .Run the demo container:
docker run -ti --rm --name torflow --link torflow-mysql:MYSQL -v /logs/:/var/log/supervisor/ -p 3000:3000 docker.uncharted.software/torflow-demo