Public | Automated Build

Last pushed: a year ago
Short Description
A minimalistic Apache Camel application that streams live Twitter photos.
Full Description

Camelympics

A minimalistic Apache Camel application (one Java class with 150 lines) that streams live Twitter photos.

Screenshot

Read more about the app on my blog

How to run using Docker

The application is compiled and available at Docker Hub.
Run the image using your own Twitter keys and preferred search term. For example:

docker run
-e "consumerKey=83VYApZjhdkKJHDa3qq2dq"
-e "consumerSecret=M00Lzd5XsHnvnRpips0LSKJDLSKJDLSKJDSApy1GFB9JjNhu"
-e "accessToken=19341814-3592zsZ1LKAJDLSAKDJVB8Z2FvNweYA0nfHACO"
-e "accessTokenSecret=ZBk0yIqjaBbWLAKSjdlskjdkLAKohve9wvgZj2XysiTo"
-e "searchTerm=euro2016,sport"
--rm -p 8080:8080 bibryam/camelympics:latest

Then go to http://DOCKER_HOST:8080
To have a larger number of previews images (which is 4x4 by default) for example 50x7 use following URL params: http://DOCKER_HOST:8080?rows=50&cols=7

How to run locally with Maven

Clone the project and update app.properties as described below.
Then compile and run the app with the following command: mvn clean compile exec:java
Then go to http://localhost:8080
To have a larger number of previews images (which is 4x4 by default) for example 50x7 use following URL params: http://localhost:8080?rows=50&cols=7

How to run on Red Hat OpenShift

If you have an OpenShift Online account, use the following commands:

oc new-project camelympics

oc login https://OPENSHIFT_HOST --token=YOUR_TOKEN

oc new-app bibryam/camelympics:latest \
-e consumerKey="KEY" \

-e consumerSecret="SECRET" \
-e accessToken="TOKEN" \
-e accessTokenSecret="TOKEN_SECRET" \


-e searchTerm="your search term, for example: euro2016"

 oc expose svc camelympics

Other notes

  • To generate Twitter keys go to here. Then update app.properties and compile the application, or simply pass the keys as environment variables. Notice that the docker container on docker hub always expects environment variables and overrides the app.properties.

  • The application can run on any platform that supports docker containers, such as Digital Ocean or Google Compute Engine.

  • The Camel application has a filter to discard possibly sensitive and NSFW content, but it is not always working as expected with a real time photo stream. Use this at your own risk!!!

License

Camelympics is licensed under The MIT License.
100% Free. Camelympics is free to use but attribution is required. This means you must leave footer links and the license info intact. That's all.

Docker Pull Command
Owner
bibryam
Source Repository