This is the application for traffic control for Kyiv users
./toolbox.sh up --on-production
./vendor/bin/doctrine-migrations generate
vendor/bin/doctrine orm:schema-tool:update --force --dump-sql
./toolbox.sh logs
./toolbox.sh tests
./toolbox.sh exec php console.php GET "/api/v1/getstops?lat=4711&lng=4567"
./toolbox.sh apidoc
https://certbot.eff.org/lets-encrypt/ubuntuxenial-haproxy
sudo certbot certonly --standalone
~/workspace $ sudo http-server ssl -p 80
~/workspace $ sudo letsencrypt certonly --webroot -w ssl/ -d bus115.kiev.ua
~/workspace/haproxy $ docker build -t haproxy .
~/workspace/haproxy/private $ sudo cat /etc/letsencrypt/live/bus115.kiev.ua-0001/fullchain.pem /etc/letsencrypt/live/bus115.kiev.ua-0001/privkey.pem > bus115.kiev.ua.pem
~/workspace/haproxy $ docker run --net=host -it haproxy
~/workspace/haproxy $ docker run -d --net=host --restart always haproxy
In order to check certificate:
~/workspace/haproxy/private (master) $ sudo ssl-cert-check -c bus115.kiev.ua.pem
docker volume create portainer_data
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
Validation
curl -X GET "https://bus115.kiev.ua/api/v1/webhook?hub.verify_token=<YOUR_VERIFY_TOKEN>&hub.challenge=CHALLENGE_ACCEPTED&hub.mode=subscribe"
curl -H "Content-Type: application/json" -X POST "https://bus115.kiev.ua/api/v1/webhook" -d '{"object": "page", "entry": [{"messaging": [{"message": "TEST_MESSAGE"}]}]}'
Get webhook info
https://api.telegram.org/bot[$TToken]/getWebhookInfo
https://circleci.com/gh/belushkin
@belushkin