Be sure you have docker installed. Then run following commands:
docker-compose build
docker-compose run --rm frontend bower install --allow-root
docker-compose run --rm backend npm install
docker-compose upVisit http://localhost:8080 to run app
- call
docker-compose start/docker-compose stopto fastly start/stop containers - you need call
docker-compose upwhen you make some changes todocker-compose.ymlfile - extend
backend/Dockerfileorfrontend/Dockerfileto install global container dependencies - Use
docker-compose runcmd to manage application. Examples:docker-compose run --rm backend npm updatedocker-compose run --rm frontend bower update --allow-root
When user connect, he'll recive most actuall data via socket communication. Every later data fetch occures at different frequency, which depends on the source. After every fetch, server stores results in file. So after every crash server would load stored file data.
Server can response which every data collected via GET request (JSON):
- GET /all - Sends all data object
- GET /ion/all - Sends all data about ion
- GET /github/all - Sends all data about github
- GET /rooms/all - Sends all data about rooms
- GET /hipchat/all - Sends all data about hipchat
- GET /weather/all - Sends all data about weather
First build docker images, for both, heartbeat backend and frontend.
docker build --rm -t heartbeat_backend backend
docker build --rm -t heartbeat_frontend frontendNow run node server container and nginx container, use this commands:
docker run --rm -it -p 3000:3000 -p 8123:8123 -v /mnt/heartbeat.docker.volume:/mnt/external.volume.stats heartbeat_backend
docker run --rm -it -p 8080:80 heartbeat_frontendIt's will try to listening on following host ports: 8080, 3000, 8123 Port 8080 is heartbeat site static content. Second ones are backend. Customize ports if you need it. Above commands run processes that should be automatically pick up when their fall.