This image is what is currently used for our iot.onl Internet of Things service.

The area51/thingspeak image contains our branch of the open source ThingSpeak IoT platform.

Note: This is still under development so will not be working correctly just yet.

Requirements

  • mysql 5.5

Usage

You'll need two images, a database and the application running. Note you may have to wait a minute when running the database until it's up and running.

docker run --name thingspeakdb -e MYSQL_ROOT_PASSWORD=speak -d mysql:5.5
docker run -d --name=thingspeakapp \
   --link thingspeakdb \
   -e DB_PASSWORD=speak \
   -e DB_HOST=thingspeakdb \
   -p 80:80 \
   area51/thingspeak 

Persisting data

Now this will work however when the database container is restarted then you'll not have any data, so it's best to create a volume based on the official mysql image documentation:

docker run --name thingspeakdb \
   -v /my/own/datadir:/var/lib/mysql \
   -e MYSQL_ROOT_PASSWORD=speak \
   -d mysql:5.5
        

First time install

If this is the first time you've run the images, the database will be empty so we have to initialise it once both images are running:

docker exec -it thingspeak rake db:create
docker exec -it thingspeak rake db:schema:load
        

You can then access the application by going to http://localhost/

Environment Variables

NameDefaultDescription
DB_USERrootDatabase user
DB_PASSWORDthingspeakDatabase password
DB_NAMEthingspeakDatabase name
DB_HOSTthingspeakDatabase host name
DB_PORT3306Database port
DB_POOL5Database pool size
HTTP_PORT80Http port
IPV6noBy default this will bind to the container's IPv4 address only.
If you want to to bind to both IPv4 & IPv6 addresses then set this to "true"