Skip to content

ivanmicetic/singularity-thingspeak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Singularity ThingSpeak

ThingSpeak server in a Singularity container.

Prerequisites

The server needs a working MySQL database on host. Install it, add a user thing/speak and enable access to databases thingspeak_test, thingspeak_development and thingspeak_production:

sudo apt install mysql-server
sudo mysql -e "CREATE USER 'thing'@'%' IDENTIFIED WITH mysql_native_password BY 'speak';"
sudo mysql -e "GRANT ALL ON thingspeak_test.* TO 'thing'@'%';"
sudo mysql -e "GRANT ALL ON thingspeak_development.* TO 'thing'@'%';"
sudo mysql -e "GRANT ALL ON thingspeak_production.* TO 'thing'@'%';"

Build

You can build a local Singularity image named thingspeak.sif with:

sudo singularity build thingspeak.sif thingspeak.def

You can skip database setup and test on host by setting the SKIP_DB_SETUP environment variable:

sudo env SINGULARITYENV_SKIP_DB_SETUP=true singularity build thingspeak.sif thingspeak.def

Run

You can run the server using the default run command:

singularity run thingspeak.sif

or as a Singularity instance:

singularity instance start thingspeak.sif thingspeak
singularity instance list
singularity instance stop thingspeak

The server should be accessible at http://localhost:3000/.

You can override the listening port with an environment variable:

export SINGULARITYENV_LISTEN_PORT=3001
singularity run thingspeak.sif

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ivanmicetic/singularity-thingspeak.

License

The code is available as open source under the terms of the MIT License.

About

ThingSpeak server in a Singularity container

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published