Docker repository to build leakz website and API
First you must clone the repository and then change directory.
git clone git@github.com:webtobesocial/docker_leakz.git
cd docker_leakz
First things first. There are some steps you might do to run the container. You must create create_user.js
file in the mongodb folder. Then you want to replace <password>
with your own password.
db.createUser({user: "pymongo", pwd: "<password>", roles: [{ role: "readWrite", db: "intel" }] });
Next you must create a .secret
file in the frontend folder. Then you want to replace <password>
with your own password which must be the same as the above password you choose.
<password>
Then you create a .config
file in the same frontend folder.
{
"mongodb_db": "intel",
"mongodb_uri": "mongodb",
"mongodb_port": "27017",
"influxdb_db": "metric",
"influxdb_uri": "influxdb",
"influxdb_port": "8086"
}
Now you are ready to run following commands from your shell.
docker-compose build --no-cache
docker-compose up -d
Now you may run docker ps
to verify that all three containers are up and running. Next we want to execute the following command. Make sure to replace <password>
with your choosen password some steps above.
docker exec docker_leakz_mongodb_1 bash -c "mongo intel create.js"
Then you should be able to open the website under http://127.0.0.1:8000/
Try to run the following command from your host system.
docker logs docker_leakz_mongodb_1
docker logs docker_leakz_frontend_1
docker logs docker_leakz_nginx_1
Don't hesitate to contact me @webtobesocial with your question.