Skip to content

Instantly share code, notes, and snippets.

[supervisord]
nodaemon=true
[program:sshd]
command=/usr/sbin/sshd -D
[program:apache2]
# VERSION 0.0.1
FROM flux7/wp-site # This is the location of our docker container.
RUN apt-get install supervisor
RUN mkdir -p /var/log/supervisor
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
{
"AWSEBDockerrunVersion": "1",
"Authentication": {
"Bucket": "flux7.com",
"Key": "docker/dockercfg"
docker run -d -p 9160:9160 -name db flux7/cassandra
# Yes. We love Python!
def start_provider(provider_id, gateway_port, admin_port ):
docker_client = docker.Client(base_url='unix://var/run/docker.sock',
version='1.6',
timeout=100)
# start a docker container for consuming gateway data at gateway_port
start_command = 'python software/remote_server.py ' + provider_id
remote_server = docker_client.create_container('flux7/labs', # docker image
command=start_command, # start command contains the keyspace parameter, keyspace is the provider_id
docker run -name remote_server_1 -link db:cassandra -p 6001:6000 flux7/labs python software/remote_server.py provider1
docker run -name flask_app_1 -link db:cassandra -p 8081:80 flux7/labs python software/flask_app.py provider1
docker run -d -p 9160:9160 -name db flux7/cassandra
nohup python tcp_server.py & # For firing up the TCP server.
nohup python flask_app.py & # For firing up the admin panel