Giter VIP home page Giter VIP logo

bus115's Introduction

Synopsis

This is the application for traffic control for Kyiv users

Installation

./toolbox.sh up --on-production

Useful commands

./vendor/bin/doctrine-migrations generate
vendor/bin/doctrine orm:schema-tool:update --force --dump-sql
./toolbox.sh logs

Tests

./toolbox.sh tests

CLI mode

./toolbox.sh exec php console.php GET "/api/v1/getstops?lat=4711&lng=4567"

APIDOC

./toolbox.sh apidoc

SSL CERTIFICATE

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

Portainer

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

Facebook webhook

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"}]}]}'

Telegram webhook

Get webhook info

https://api.telegram.org/bot[$TToken]/getWebhookInfo

CircleCI

https://circleci.com/gh/belushkin

Contributors

@belushkin

License MIT License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.