GithubHelp home page GithubHelp logo

dokku-shoreman's Introduction

dokku-shoreman

Deprecated as of Dokku 0.3.14 (process management) and 0.7.0 (restart policies)

dokku-shoreman is a plugin for dokku that injects a stripped down version of shoreman, a Procfile runner written in bash.

Normally, dokku only runs the web process within Procfile. The dokku-shoreman plugin will run all process types (web, worker, etc.) and stop them all together.

Installation

###previous versions (0.3.x and below)

git clone https://github.com/statianzo/dokku-shoreman.git /var/lib/dokku/plugins/dokku-shoreman
dokku plugins-install

###latest versions

sudo dokku plugin:install https://github.com/statianzo/dokku-shoreman.git

All future deployments will use shoreman to start all processes.

v0.2.0 breaking change

In v0.2.0, dokku-shoreman had its pluginhook file renamed to post-build-buildstep to regain compatibility with upstream dokku. Users of older dokku should pin their dokku-shoreman to v0.1.x.

License

The MIT License (MIT)

Copyright (c) 2013 Jason Staten

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

dokku-shoreman's People

Contributors

egerlach avatar fabdelgado avatar jeresig avatar josegonzalez avatar pmvieira avatar robinqu avatar sglebs avatar statianzo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dokku-shoreman's Issues

commented lines in Procfile causing problem again

Despite my fix in #18 , now with dokku 0.4.x I am having problems pushing the same Procfile with commented out lines:

remote: /usr/local/bin/dokku: line 112: [[: # b) after you have a migration script from : syntax error: operand expected (error token is "# b) after you have a migration script from ")
remote: /usr/local/bin/dokku: line 177: # b) after you have a migration script from : syntax error: operand expected (error token is "# b) after you have a migration script from ")
To [email protected]:softdispdjango-dev
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:softdispdjango-dev'

The Procfile:

web: python manage.py collectstatic --noinput; gunicorn -c gunicorn_config.py main.wsgi
cronloop: python dashboard/cron/cron_loop.py
#weblocal: gunicorn main.wsgi
# a) if you change the model, run this to generate a migration script:
#export PYTHONPATH=$PYTHONPATH:$PWD;export DJANGO_SETTINGS_MODULE=main.settings;django-admin makemigrations --dry-run
# repeat without the --dry-run
# b) after you have a migration script from #a above, run this:
#python manage.py migrate --fake-initial
# run this from cron to take health snapshots (every 10 mins?):
#healthsnapshot: python dashboard/cron/take_health_snapshot.py
# run this from cron to take newrelic snapshots (every 10 mins?):
#newrelicsnapshot: python dashboard/cron/take_newrelic_snapshot.py
# run this from cron to delete old health snapshots (every 24h?):
#prunehealthsnapshots: python dashboard/cron/delete_old_data_snapshots.py

Logs

Hi,

Thanks for this, its working great to run a couple processes. I am curious as to how the logging works? Only stderr, and the initial bootstrap messages appear to be logging out to dokku logs for me.

Is there a way to get all stdout to pipe through to the dokku logs?

Not working for a second app

My Procfile works for my first app but not the second. This is the content of the file

web: bundle exec rails server -p $PORT
worker: bundle exec rake jobs:work

Allow deployment to specify the Procfile role to run.

For instance:

Procfile

web: ./my_web_site
worker: ./my_worker
arbprocess: ./my_other_process

Then setting:

DOKKU_ROLES="worker arbprocess"

will only run the worker and arbprocess processes.

Is this a good idea?

docker run exiting with status code 1 (line 42)

When I run line 42 in the post-release file then do "docker ps -a", I see the process exited with status 1. Any idea why? On a related note, when I try to run the script, the variables $APP and $1 are not set, so I overwrote $APP with my app name.

Permission denied to static file directory after install dokku-shoreman

I have an application running on DigitalOcean under Dokku. The application works fine. As soon as I install dokku-shoreman plugin and make a push to the server (without changing any code), the static files directory where the app was happily writing before throws a IOError: [Errno 13] Permission denied error.

What could be causing this?

# dokku version
0.3.26

Multiple workers?

Will Shoreman run multiple workers? Before I start building the next worker app, I'd like to know it's possible ๐Ÿ‘

Logs seem to lag a bit

I am not sure if this is just me but it seems like the logs lag bit when I use dokku-shoreman. I have a process that runs every 20s and logs it, but the logs are only updating every few minutes.

Ran into issue with nginx on digitalocean

Hi, I ran into this issue on digitalocean where my instance is already configured from the start with docker and dokku. I just tried installing shoreman, but it seems to run into issue with nginx.

Any ideas how to go about fixing it?

Thanks!

Update: seems like its trying to re-install nginx which is already there, so its probably not a shoreman issue. Moving to stackoverflow..

root@michal-do:~# git clone https://github.com/statianzo/dokku-shoreman.git /var/lib/dokku/plugins/dokku-shoreman
Cloning into '/var/lib/dokku/plugins/dokku-shoreman'...
remote: Counting objects: 26, done.
remote: Total 26 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (26/26), done.
Checking connectivity... done.
root@michal-do:~# dokku plugins-install
gpg: keyring `/tmp/tmp8atz7825/secring.gpg' created
gpg: keyring `/tmp/tmp8atz7825/pubring.gpg' created
gpg: requesting key C300EE8C from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp8atz7825/trustdb.gpg: trustdb created
gpg: key C300EE8C: public key "Launchpad Stable" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

Configuration file '/etc/nginx/nginx.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** nginx.conf (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package nginx-common (--configure):
 EOF on stdin at conffile prompt
dpkg: dependency problems prevent configuration of nginx-full:
 nginx-full depends on nginx-common (= 1.6.2-5+trusty0); however:
  Package nginx-common is not configured yet.

dpkg: error processing package nginx-full (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nginx:
 nginx depends on nginx-full (>= 1.6.2-5+trusty0) | nginx-light (>= 1.6.2-5+trusty0) | nginx-extras (>= 1.6.2-5+trusty0); however:
  Package nginx-full is not configured yet.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.
 nginx depends on nginx-full (<< 1.6.2-5+trusty0.1~) | nginx-light (<< 1.6.2-5+trusty0.1~) | nginx-extras (<< 1.6.2-5+trusty0.1~); however:
  Package nginx-full is not configured yet.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.

dpkg: error processing package nginx (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
 nginx-common
 nginx-full
 nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)

ERROR: open /var/lib/dokku/plugins/available/shoreman/plugin.toml: no such file or directory

Get an error when I update dokku to 0.4.1.
For 0.4.*, I installed shoreman by

dokku plugin:install https://github.com/statianzo/dokku-shoreman.git

Seems plugin.toml is a meta file, and now I can not start job worker by shoreman.

Any ideas ?

ubuntu@ip-172-31-12-26:/var/lib/dokku/plugins/available$ sudo dokku plugin:install https://github.com/statianzo/dokku-shoreman.git
-----> Cloning plugin repo https://github.com/statianzo/dokku-shoreman.git to /var/lib/dokku/plugins/available/shoreman
Cloning into 'shoreman'...
remote: Counting objects: 50, done.
remote: Total 50 (delta 0), reused 0 (delta 0), pack-reused 50
Unpacking objects: 100% (50/50), done.
Checking connectivity... done.
-----> Plugin shoreman enabled
svendowideit/ambassador   latest              87f96952e018        47 hours ago        6.454 MB
dokkupaas/wait            latest              1c1a3590522d        2 weeks ago         1.096 MB
2015/10/14 13:38:39 open /var/lib/dokku/plugins/available/shoreman/plugin.toml: no such file or directory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.