[+] AUTOR: Gerardo Junior
[+] SITE: https://gerardo-junior.com
[+] EMAIL: me@gerardo-junior.com
[+] GITHUB: https://github.com/gerardo-junior/tap.api
[+] TELEGRAM: @gerardojunior
master | develop |
---|---|
- docker ~ 18.04.0-ce
- docker-compose ~ 1.21.1
First clone of the project
git clone https://github.com/gerardo-junior/tap.api.git
cd tap.api
Copy the configuration file, and edit
cp config.example.ini config.ini # and configure!
ready, now you can use ;)
docker-compose up # the first time, it will download the images
*~ Tip: using the docker-compose you can add -d
and you can keep with your terminal ~*
To access the api:
Wait for message and open localhost:1234 in your browser
To use a cli:
docker-compose exec api php console
** For more information about the api container read the README of api.environment
docker-compose exec api php console twitter tweets [term of serach]
- ~ Tip: in bash, the
#
character is used for comments so you should escape them, with the\
. example:\#
~ *
examples of use:
# get last tweets
docker-compose exec api php console twitter tweets \#worldCup
# real time tweets
docker-compose exec api php console twitter tweets --real-time \#worldCup
- ~ You can filter by
\#hashtags
, by@users
, bytext
.... *
docker-compose down --rmi all
docker volume rm tap-dbdata
you will need to install:
and configure apache for /public folder
- redound/phalcon-rest: ^2.0.0
- phalcon/incubator: 3.3
- league/fractal: ^0.13.0
- cboden/ratchet: ^0.4.1
- zircote/swagger-php: ^2.0
- spatie/twitter-streaming-api: ^1.4
- j7mbo/twitter-api-php: ^1.0
for development environment:
- codeception/codeception: ^2.1
- overtrue/phplint: ^1.1
- brainmaestro/composer-git-hooks: ^2.4
- phalcon/devtools: ^3.2
edit the file docker-compose.yml
# (...)
api:
image: gerardojunior/tap.api.environment:stable
restart: on-failure
volumes:
- type: bind
source: ./
target: /usr/share/src
ports:
- [any door]:80
- [any door]:8080
links:
- mongodb
depends_on:
- mongodb
# (...)
The browser just says: "connection reset" or something like that with child pid xxx exit signal Illegal instruction
log ?
phalcon does not have full support for the multlib architecture, so maybe re-compiling the environment might resolve.
please read: README.md but remember to tag with tag of docker-compose.yml ~ gerardojunior/tap.api.environment:stable
by default
This project is licensed under the MIT License - see the LICENSE file for details