To run your script/worker continuously you can use the supervisor.
apt-get install supervisor
Run your worker as daemon with supervisor make sure your that your configuration looks like worker.conf below
| for image in $(docker images | awk '{ if ( $1 == "<none>" )print $3}') do | |
| docker rmi $image done |
| /** | |
| * Module dependencies. | |
| */ | |
| var express = require('express') | |
| , routes = require('./routes') | |
| , user = require('./routes/user') | |
| , http = require('http') | |
| , path = require('path'); |
| docker run -it --rm --link myapp_mongo_1:mongo --net myapp_default -v ~/dump_parent_dir:/tmp mongo mongorestore --host mongo --db local_db /tmp/myapp-dump |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| # | |
| # Bash script to setup headless Selenium (uses Xvfb and Chrome) | |
| # (Tested on Ubuntu 12.04) trying on ubuntu server 14.04 | |
| # Add Google Chrome's repo to sources.list | |
| echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list | |
| # Install Google's public key used for signing packages (e.g. Chrome) | |
| # (Source: http://www.google.com/linuxrepositories/) |
This Gist shows how to start and stop Xvfb from a Grunt script as part of your build. This is useful if you want to run unit tests in a browser in a headless setting.
| docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash |
| if ( ! defined( 'WP_HOME' ) ) { | |
| $protocol = ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] ) ? 'https' : 'http'; | |
| define( 'WP_HOME', $protocol . '://' . $_SERVER['SERVER_NAME'] ); | |
| } | |
| if ( ! defined( 'WP_SITEURL' ) ) { | |
| define( 'WP_SITEURL', WP_HOME . '/wordpress' ); | |
| } | |
| define('WP_CONTENT_DIR', dirname(__FILE__) . '/htdocs/wp-content'); |