GithubHelp home page GithubHelp logo

dokku / dokku Goto Github PK

View Code? Open in Web Editor NEW
26.0K 26.0K 1.8K 17.03 MB

A docker-powered PaaS that helps you build and manage the lifecycle of applications

Home Page: https://dokku.com

License: MIT License

Shell 57.25% JavaScript 0.38% HTML 0.83% Clojure 0.04% Go 36.30% Java 0.05% Ruby 0.01% Python 1.55% PHP 0.01% Scala 0.13% Makefile 2.21% Dockerfile 0.57% Handlebars 0.01% SCSS 0.01% Procfile 0.49% HCL 0.09% Smarty 0.09%
buildpack containers devops docker dokku heroku kubernetes nomad paas

dokku's Introduction

Dokku

Build Status Ubuntu Package Arch Package Slack Group Documentation OpenCollective OpenCollective Patreon

Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen.

Sponsors

Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor]

OpenCollective Sponsor 0 OpenCollective Sponsor 1 OpenCollective Sponsor 2 OpenCollective Sponsor 3 OpenCollective Sponsor 4 OpenCollective Sponsor 5 OpenCollective Sponsor 6 OpenCollective Sponsor 7 OpenCollective Sponsor 8 OpenCollective Sponsor 9 OpenCollective Sponsor 10 OpenCollective Sponsor 11 OpenCollective Sponsor 12 OpenCollective Sponsor 13 OpenCollective Sponsor 14 OpenCollective Sponsor 15 OpenCollective Sponsor 6 OpenCollective Sponsor 17 OpenCollective Sponsor 18

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

OpenCollective Backer 0 OpenCollective Backer 1 OpenCollective Backer 2 OpenCollective Backer 3 OpenCollective Backer 4 OpenCollective Backer 5 OpenCollective Backer 6 OpenCollective Backer 7 OpenCollective Backer 8 OpenCollective Backer 9 OpenCollective Backer 10 OpenCollective Backer 11 OpenCollective Backer 12 OpenCollective Backer 13 OpenCollective Backer 14 OpenCollective Backer 15 OpenCollective Backer 16 OpenCollective Backer 17 OpenCollective Backer 18 OpenCollective Backer 19 OpenCollective Backer 20 OpenCollective Backer 21 OpenCollective Backer 22 OpenCollective Backer 23 OpenCollective Backer 24 OpenCollective Backer 25 OpenCollective Backer 26 OpenCollective Backer 27 OpenCollective Backer 28 OpenCollective Backer 29

Requirements

A fresh VM running any of the following operating systems:

  • Ubuntu 20.04 / 22.04 x64 - Any currently supported release
  • Debian 10+ x64
  • Arch Linux x64 (experimental)

An SSH keypair that can be used for application deployment. If this exists before installation, it will be automatically imported into dokku. Otherwise, you will need to import the keypair manually after installation using dokku ssh-keys:add.

Installation

To install the latest stable release, run the following commands as a user who has access to sudo:

wget -NP . https://dokku.com/install/v0.34.4/bootstrap.sh
sudo DOKKU_TAG=v0.34.4 bash bootstrap.sh

You can then proceed to configure your server domain (via dokku domains:set-global) and user access (via dokku ssh-keys:add) to complete the installation.

If you wish for a more unattended installation method, see these docs.

Upgrade

View the docs for upgrading from an older version of Dokku.

Documentation

Full documentation - including advanced installation docs - are available online at https://dokku.com/docs/getting-started/installation/.

Support

You can use GitHub Issues, check Troubleshooting in the documentation, or join us on Gliderlabs Slack in the #dokku channel.

Contribution

After checking GitHub Issues, the Troubleshooting Guide or having a chat with us on Gliderlabs Slack in the #dokku channel, feel free to fork and create a Pull Request.

While we may not merge your PR as is, they serve to start conversations and improve the general Dokku experience for all users.

License

MIT License © Jeff Lindsay

dokku's People

Contributors

akirtovskis avatar alexbeletsky avatar alexquick avatar asm89 avatar callahad avatar cellane avatar dependabot-preview[bot] avatar dependabot[bot] avatar ebeigarts avatar flink avatar fwolfst avatar jayjun avatar jazzzz avatar joliv avatar josegonzalez avatar joshco avatar joshmanders avatar mbtamuli avatar michaelshobbs avatar omarshehata avatar omgimalexis avatar plietar avatar progrium avatar scjody avatar sonicdoe avatar trevorturk avatar u2mejc avatar xadh00m avatar yasoob avatar znz 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  avatar  avatar

Watchers

 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  avatar  avatar

dokku's Issues

/app/.profile.d/config_vars file does not have correct quoting (JVM buildpacks)

Results in non-fatal (but undesirable) error messages during app start like this:

/app/.profile.d/config_vars: line 2: -Xss512k: command not found
/app/.profile.d/config_vars: line 3: -Xss512k: command not found

The problem is https://github.com/progrium/buildstep/blob/master/stack/builder#L58 :

for file in $app_root/.profile.d/*; do source \$file; done

will try and source any file it finds in .profile.d, when it should only source executable files. Apologies for this one - will try and submit a PR for buildstep when I have a bit of time.

No `buildstep` folder in `~/dokku`

The readme contains a section on upgrading.
I do have the ~/dokku folder, but not the ~/dokku/buildstep directory.

$root@machine:~/dokku# ls -al

total 40
drwxr-xr-x 3 root root 4096 Jun 10 08:14 .
drwx------ 6 root root 4096 Jun 10 06:55 ..
drwxr-xr-x 8 root root 4096 Jun 10 06:47 .git
-rw-r--r-- 1 root root  189 Jun 10 06:47 Makefile
-rw-r--r-- 1 root root 3863 Jun 10 06:47 README.md
-rw-r--r-- 1 root root 1244 Jun 10 06:47 bootstrap.sh
-rwxr-xr-x 1 root root  939 Jun 10 06:47 deploystep
-rwxr-xr-x 1 root root  201 Jun 10 06:47 nginx-app-conf
-rw-r--r-- 1 root root  106 Jun 10 06:47 nginx-reloader.conf
-rwxr-xr-x 1 root root  300 Jun 10 06:47 receiver

My server is up and running, I pushed my Rails app, now what?

I see application deployed: http://rails-app.domain.com.
But when I visit that URL I only get to see the default Nginx page.

I read the docs, dabbled around in the buildpacks, ... but I'm in the dark.

What do I have to do to actually see my Rails app running on my (sub)domain?

dokku should clean up containers

dokku isn't cleaning up containers which it doesn't need any more. While they may not take a lot of space, they should still be cleaned up.

bsdtar failure

Trying to setup dokku on Digital Ocean breaks with:

2013/06/25 10:10:46 Error: fork/exec /usr/bin/bsdtar: cannot allocate memory:

...and nothing else. Trying to debug, this is mostly a heads up.

Deploying to root URL

Say, I have dokku setup with VHOST dokku.me. And I have application, site.

I want to be able to deploy this application to http://dokku.me not to http://site.dokku.me.

Correct me if I'm wrong, but seems like it's not currently supported?

Roadmap for 0.2.0 Release

In no particular order:

  • Uses latest version of Docker again
  • Expose commands over SSH using sshcommand
  • App config / environment variable management
  • Basic hooks/plugin system
  • Pull nginx vhosts out into plugin
  • Separate dokku and buildstep more cleanly
  • Integration test coverage
  • export/import (ssh keys / acl + app configuration)
  • app delete command
  • Use dokku as the system user instead of git
  • run command

Host-specific pre/post deploystep hooks

Hi,
I'd like to do a couple of - perhaps slightly un-Heroku-ish - things in my environment, and wondered what your thoughts would be on doing this in a way that doesn't require dokku core to be customized for people with specific wants like these.

Locally, I've been experimenting with adding pre and post deploystep 'hooks' to the receiver script. If these scripts are present on the dokku host, they'll be invoked just before or just after deploystep, and can do setup-type tasks outside of the container, with access to the host's more permanent filesystem, shared services, etc.

I'd envisage this could be useful, for some people, for things like:

  • Pre-deploy: automatically creating a unique postgres user+database during first deploy, and injecting DATABASE_URL into the env vars of the container. I have a PoC of this working - see https://gist.github.com/rnorth/5772315 for part of it.
  • Post-deploy: attaching a background process to the docker container to pipe logs to a central log location. (I'm thinking of this: http://www.12factor.net/logs)
  • Post-deploy: maybe the nginx config and reload steps could be migrated to a post-deploy script

I doubt everyone will want to automate these things, but I'm quite keen to do so on my servers and imagine that other people might have the desire to do similar things in their own environments...

Would be grateful for your thoughts!

Applying SSL

From README and from code I can see that feature is currently missing. Howerer, I needed that much so would like to contribute it.

But before I would like to discuss with you guys, how actually it should be done.

My idea is following: application with the suffix -ssl are SSL'ed one. In nginx post-deploy step we can detect that application requires SSL, so instead of default template we generate something like:

server {
listen   443;

ssl    on;
ssl_certificate    /home/git/APP/ssl/APP.crt; (or .pem)
ssl_certificate_key    /home/git/APP/ssl/APP.key;

/ssl folder have to be prepared manually, all keys and certificates are expected to be there.

Would it work?

how to kill the application?

I have several test applications running on my machine. I want to know how can I kill the instanses I don't need anymore?

How do you cleanly undeploy an app?

What would be best way to cleanly and completely remove a deployed app (image)?

Would it be?:

$ docker rm <container>
$ docker rmi <image>
$ rm -rf ~/dokku/<app>

Thanks!

"Welcome to Nginx"

I'm unsure whether this is an issue with my setup or dokku (or both.) I purchased a $5-per-month VPS from DigitalOcean and done a clean install of Ubuntu 13.04 x64 Server on it. After doing so, I followed the readme and deployed node-js-sample-app (under the name noder)

However, after doing so, I'm greeted with a 'Welcome to Nginx' message.

http://noder.apps.fine.io/

Include packages from Cedar stack to improve Heroku compatibility

Heroku's build script for the Cedar stack includes a fair few system packages that aren't yet installed in the base buildstep container image.

If we add these, and also match versions of key components, we could probably improve compatibility with the Heroku buildpacks.

The Cedar stack script is here:
https://github.com/heroku/stack-images/blob/master/bin/cedar.sh
(might be worth checking other scripts in the same repo in case they contain anything pertinent)

Selective changes need to be included here:
https://github.com/progrium/buildstep/blob/master/build-dir/prepare

As suggested by @progrium things like the locales probably don't need to be included.

Look into whether more application startup logs/failures can be made visible to the user

Given @webdevotion's debugging experience and my own experiences, I feel it would be helpful if deploystep displayed more in the way of app startup logs. Otherwise a user can be left in the dark on the basis of seeing successful buildstep messages but not seeing a failure to actually start the app.

It might be good to convey the stdout/stderr from 'start web' to the user - perhaps via a short-lived docker attach?

Knowing when to stop the stdout/err feed might be tricky - perhaps:

  • poll the app's listening port to detect when it starts accepting HTTP or TCP connections, and use that as a signal of a successful launch
  • if the docker container terminates before success is detected, then display an error for the user's attention?

Obviously implementing this in a small, robust and elegant manner would be important :)

Clarify setup docs for noob

From the README:

Set up a domain and a wildcard domain pointing to that host. Make sure /home/git/DOMAIN is set to this domain. By default it's set to whatever the hostname the host has.

When I cd into home/git, I see a bash script called receiver and nothing else:

adelevie@paas:/home/git$ ls
receiver

I'm fairly new to working with UNIX boxes, but could someone clarify what this means?
e.g. If my domain is foo.com, what do I do here? It might also be nice include this clarification in the README (happy to set up a PR based on responses here).

Apps/containers don't start at boot

Hey! Dokku is really great and it's something I was looking for a while. It works flawlessly except it doesn't start the containers at boot. I tried what this commit does, but I had no luck. How can I get them to start at boot? Thanks!

PD: I'm running it on an Amazon EC2 instance.

Everything is run as root

Currently everything in a deployed container is run as root, we should probably mirror heroku's user setup. This will make more buildpacks ready to go. :)

Fail on local deploy

I'm hacking with dokku on local machine. I run vargant and it's bootstrapped and seems to work fine (except the fact I had to apt-get install git manually).

Having a basic node.js application, I'm trying to deploy, but build step is failing:

in node-simple/ on master 
› git push local-deploy master
Counting objects: 972, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (833/833), done.
Writing objects: 100% (972/972), 752.85 KiB | 0 bytes/s, done.
Total 972 (delta 102), reused 0 (delta 0)
remote: -----> Building node-simple ...
remote:        Node.js app detected
remote: 
remote: gzip: stdin: unexpected end of file
remote: tar: Child returned status 1
remote: tar: Error is not recoverable: exiting now
remote:       ERROR: failed on rev 8c37a7ceb8f3d9b0f954571de8bcae0c2d168077 - push denied
To [email protected]:node-simple
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:node-simple'

Have anyone seen something similar?

Failing git post-receive hook should prevent push

While attempting to deploy my app to Dokku I hit an error with a gem. I can fix the error there, but even though the app failed to deploy and launch the "git push" command completed. Thus, to refresh the app, I was forced to make a new garbage commit so I could push a new update. Instead, I the git push should fail (and roll back) so I can fix the problem locally and re-push.

$ git push dokku1 master
X11 forwarding request failed on channel 0
Counting objects: 5, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 295 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: -----> Building dokkutest.git ...
remote:        Ruby/Rails app detected
remote: -----> Using Ruby version: ruby-2.0.0
remote: -----> Installing dependencies using Bundler version 1.3.2
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
remote:        Fetching gem metadata from https://rubygems.org/.........
remote:        Fetching gem metadata from https://rubygems.org/..
remote:        Installing rake (10.1.0)
remote:        Installing i18n (0.6.4)
remote:        Installing minitest (4.7.5)
remote:        Installing multi_json (1.7.7)
remote:        Installing atomic (1.1.10)
remote:        Installing thread_safe (0.1.0)
remote:        Installing tzinfo (0.3.37)
remote:        Installing activesupport (4.0.0)
remote:        Installing builder (3.1.4)
remote:        Installing erubis (2.7.0)
remote:        Installing rack (1.5.2)
remote:        Installing rack-test (0.6.2)
remote:        Installing actionpack (4.0.0)
remote:        Installing mime-types (1.23)
remote:        Installing polyglot (0.3.3)
remote:        Installing treetop (1.4.14)
remote:        Installing mail (2.5.4)
remote:        Installing actionmailer (4.0.0)
remote:        Installing activemodel (4.0.0)
remote:        Installing activerecord-deprecated_finders (1.0.3)
remote:        Installing arel (4.0.0)
remote:        Installing activerecord (4.0.0)
remote:        Installing coffee-script-source (1.6.2)
remote:        Installing execjs (1.4.0)
remote:        Installing coffee-script (2.2.0)
remote:        Installing thor (0.18.1)
remote:        Installing railties (4.0.0)
remote:        Installing coffee-rails (4.0.0)
remote:        Installing hike (1.2.3)
remote:        Installing jbuilder (1.4.2)
remote:        Installing jquery-rails (3.0.1)
remote:        Installing json (1.8.0)
remote:        Using bundler (1.3.2)
remote:        Installing tilt (1.4.1)
remote:        Installing sprockets (2.10.0)
remote:        Installing sprockets-rails (2.0.0)
remote:        Installing rails (4.0.0)
remote:        Installing rdoc (3.12.2)
remote:        Installing sass (3.2.9)
remote:        Installing sass-rails (4.0.0)
remote:        Installing sdoc (0.3.20)
remote:        Installing sqlite3 (1.3.7)
remote:        Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
remote:        /build/app/vendor/ruby-2.0.0/bin/ruby extconf.rb
remote:        checking for sqlite3.h... no
remote:        sqlite3.h is missing. Try 'port install sqlite3 +universal'
remote:        or 'yum install sqlite-devel' and check your shared library search path (the
remote:        location where your sqlite3 shared library is located).
remote:        *** extconf.rb failed ***
remote:        Could not create Makefile due to some reason, probably lack of necessary
remote:        libraries and/or headers.  Check the mkmf.log file for more details.  You may
remote:        need configuration options.
remote:        Provided configuration options:
remote:        --with-opt-dir
remote:        --without-opt-dir
remote:        --with-opt-include
remote:        --without-opt-include=${opt-dir}/include
remote:        --with-opt-lib
remote:        --without-opt-lib=${opt-dir}/lib
remote:        --with-make-prog
remote:        --without-make-prog
remote:        --srcdir=.
remote:        --curdir
remote:        --ruby=/build/app/vendor/ruby-2.0.0/bin/ruby
remote:        --with-sqlite3-dir
remote:        --without-sqlite3-dir
remote:        --with-sqlite3-include
remote:        --without-sqlite3-include=${sqlite3-dir}/include
remote:        --with-sqlite3-lib
remote:        --without-sqlite3-lib=${sqlite3-dir}/
remote:        --enable-local
remote:        --disable-local
remote:        Gem files will remain installed in /build/app/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.7 for inspection.
remote:        Results logged to /build/app/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.7/ext/sqlite3/gem_make.out
remote:        An error occurred while installing sqlite3 (1.3.7), and Bundler cannot continue.
remote:        Make sure that `gem install sqlite3 -v '1.3.7'` succeeds before bundling.
remote:        Bundler Output: Fetching gem metadata from https://rubygems.org/.........
remote:        Fetching gem metadata from https://rubygems.org/..
remote:        Installing rake (10.1.0)
remote:        Installing i18n (0.6.4)
remote:        Installing minitest (4.7.5)
remote:        Installing multi_json (1.7.7)
remote:        Installing atomic (1.1.10)
remote:        Installing thread_safe (0.1.0)
remote:        Installing tzinfo (0.3.37)
remote:        Installing activesupport (4.0.0)
remote:        Installing builder (3.1.4)
remote:        Installing erubis (2.7.0)
remote:        Installing rack (1.5.2)
remote:        Installing rack-test (0.6.2)
remote:        Installing actionpack (4.0.0)
remote:        Installing mime-types (1.23)
remote:        Installing polyglot (0.3.3)
remote:        Installing treetop (1.4.14)
remote:        Installing mail (2.5.4)
remote:        Installing actionmailer (4.0.0)
remote:        Installing activemodel (4.0.0)
remote:        Installing activerecord-deprecated_finders (1.0.3)
remote:        Installing arel (4.0.0)
remote:        Installing activerecord (4.0.0)
remote:        Installing coffee-script-source (1.6.2)
remote:        Installing execjs (1.4.0)
remote:        Installing coffee-script (2.2.0)
remote:        Installing thor (0.18.1)
remote:        Installing railties (4.0.0)
remote:        Installing coffee-rails (4.0.0)
remote:        Installing hike (1.2.3)
remote:        Installing jbuilder (1.4.2)
remote:        Installing jquery-rails (3.0.1)
remote:        Installing json (1.8.0)
remote:        Using bundler (1.3.2)
remote:        Installing tilt (1.4.1)
remote:        Installing sprockets (2.10.0)
remote:        Installing sprockets-rails (2.0.0)
remote:        Installing rails (4.0.0)
remote:        Installing rdoc (3.12.2)
remote:        Installing sass (3.2.9)
remote:        Installing sass-rails (4.0.0)
remote:        Installing sdoc (0.3.20)
remote:        Installing sqlite3 (1.3.7)
remote:        Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
remote:
remote:        /build/app/vendor/ruby-2.0.0/bin/ruby extconf.rb
remote:        checking for sqlite3.h... no
remote:        sqlite3.h is missing. Try 'port install sqlite3 +universal'
remote:        or 'yum install sqlite-devel' and check your shared library search path (the
remote:        location where your sqlite3 shared library is located).
remote:        *** extconf.rb failed ***
remote:        Could not create Makefile due to some reason, probably lack of necessary
remote:        libraries and/or headers.  Check the mkmf.log file for more details.  You may
remote:        need configuration options.
remote:
remote:        Provided configuration options:
remote:        --with-opt-dir
remote:        --without-opt-dir
remote:        --with-opt-include
remote:        --without-opt-include=${opt-dir}/include
remote:        --with-opt-lib
remote:        --without-opt-lib=${opt-dir}/lib
remote:        --with-make-prog
remote:        --without-make-prog
remote:        --srcdir=.
remote:        --curdir
remote:        --ruby=/build/app/vendor/ruby-2.0.0/bin/ruby
remote:        --with-sqlite3-dir
remote:        --without-sqlite3-dir
remote:        --with-sqlite3-include
remote:        --without-sqlite3-include=${sqlite3-dir}/include
remote:        --with-sqlite3-lib
remote:        --without-sqlite3-lib=${sqlite3-dir}/
remote:        --enable-local
remote:        --disable-local
remote:
remote:
remote:        Gem files will remain installed in /build/app/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.7 for inspection.
remote:        Results logged to /build/app/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.7/ext/sqlite3/gem_make.out
remote:        An error occurred while installing sqlite3 (1.3.7), and Bundler cannot continue.
remote:        Make sure that `gem install sqlite3 -v '1.3.7'` succeeds before bundling.
remote:  !
remote:  !     Failed to install gems via Bundler.
remote:  !
remote:  !     Detected sqlite3 gem which is not supported on Heroku.
remote:  !     https://devcenter.heroku.com/articles/sqlite3
remote:  !
remote: -----> Build complete!
remote: -----> Deploying dokkutest.git ...
remote: -----> Application deployed:
remote:        http://dokku1:49153
remote:
To [email protected]:dokkutest.git
   9a6413f..d01445f  master -> master

Can't make node.js app running

I have Ubuntu 13 x64 instance running. Dokku is installed there, without any issues.

The node.js app contains Procfile -> web: bin/node app.js, push to remote goes fine, at the end I can see:

remote: -----> Building runtime environment
remote: -----> Discovering process types
remote:        Procfile declares types -> web
remote: -----> Build complete!
remote: -----> Deploying marketing-site ...
remote: =====> Application deployed:
remote:        http://likeastore:49153

But, pointing browser to http://192.241.207.10:49153/ show no results.

Dokku still a lot of magic to me, so it's hard to assume what might go wrong. But my assumption that node process is either not running or crashing at the start.

Are there any logs?

First time deploys port mappings mess up after reboot

When I deploy a new application and reboot the docker container restarts on another port so all the nginx mappings fail and the app can't be accessed.

Steps to reproduce:

  1. Push a brand new repo to dokku
  2. Reboot the machine
  3. Try to access the app.

You'll either the a 502 bad gateway error, or the wrong app (if the port got mapped to another app).

Here's an audit trail after I pushed a new app nodetest2.

After I initially pushed it, here's what the docker ps returned:

ID                  IMAGE                       COMMAND                CREATED             STATUS              PORTS               SIZE
3c6858a2eab4        app/nodetest2:latest        /bin/bash -c /start    38 seconds ago      Up 23 seconds       49160->5000         16.39 kB (virtual 985.9 MB)

Notice that it was listening on port 49160.

And cating the CONTAINER and PORT entries in the /home/git/nodetest2 did:

root@euge:/home/git/nodetest2# cat CONTAINER
3c6858a2eab4
root@euge:/home/git/nodetest2# cat PORT
49160
root@euge:/home/git/nodetest2# cat nginx.conf
upstream nodetest2 { server 127.0.0.1:49160; }
server {
  listen      80;
  server_name nodetest2.euge.co;
  location    / {
    proxy_pass  http://nodetest2;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $http_host;
  }
}

Looking at the config.json for the docker container gives:

{"ID":"3c6858a2eab44bac6bcd17e09d2749fd2fbe59289efcb981ac289308721851fb","Created":"2013-07-07T10:58:45.651908068Z","Path":"/bin/bash","Args":["-c","/start web"],"Config":{"Hostname":"3c6858a2eab4","User":"","Memory":0,"MemorySwap":0,"CpuShares":0,"AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"PortSpecs":["5000"],"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PORT=5000"],"Cmd":["/bin/bash","-c","/start web"],"Dns":null,"Image":"app/nodetest2","Volumes":{},"VolumesFrom":""},"State":{"Running":true,"Pid":3111,"ExitCode":0,"StartedAt":"2013-07-07T10:58:45.733151021Z","Ghost":false},"Image":"cb67ce2218ffc55c9e9ba52c7413246b0697edebcba01f63fdab3123a868ee74","NetworkSettings":{"IPAddress":"172.16.42.12","IPPrefixLen":24,"Gateway":"172.16.42.1","Bridge":"docker0","PortMapping":{"5000":"49160"}},"SysInitPath":"/usr/bin/docker","ResolvConfPath":"/etc/resolv.conf","Volumes":{}}

Everything is working and set to map to port 49160.

When I reboot, however, this is what docker ps shows:

ID                  IMAGE                       COMMAND                CREATED             STATUS              PORTS               SIZE
3c6858a2eab4        app/nodetest2:latest        /bin/bash -c /start    11 minutes ago      Up 11 seconds       49153->5000         16.39 kB (virtual 985.9 MB)

See how the port has now been mapped to 49153. Therefore the nginx port forwarding won't work and the app is inaccessible.

Checking the docker container file once again:

{"ID":"3c6858a2eab44bac6bcd17e09d2749fd2fbe59289efcb981ac289308721851fb","Created":"2013-07-07T10:58:45.651908068Z","Path":"/bin/bash","Args":["-c","/start web"],"Config":{"Hostname":"3c6858a2eab4","User":"","Memory":0,"MemorySwap":0,"CpuShares":0,"AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"PortSpecs":["5000"],"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PORT=5000"],"Cmd":["/bin/bash","-c","/start web"],"Dns":null,"Image":"app/nodetest2","Volumes":{},"VolumesFrom":""},"State":{"Running":true,"Pid":1029,"ExitCode":0,"StartedAt":"2013-07-07T11:09:05.82098963Z","Ghost":false},"Image":"cb67ce2218ffc55c9e9ba52c7413246b0697edebcba01f63fdab3123a868ee74","NetworkSettings":{"IPAddress":"172.16.42.3","IPPrefixLen":24,"Gateway":"172.16.42.1","Bridge":"docker0","PortMapping":{"5000":"49153"}},"SysInitPath":"/usr/bin/docker","ResolvConfPath":"/etc/resolv.conf","Volumes":{}}

And the port has changed to 49153.

I'm not sure what the solution is as my knowledge of docker is limited. You could rewrite the nginx conf file after reboot...

Strangely enough, however, when you do a SECOND push, then the whole thing works as it's not mapping to port 5000, and the port mappings stay correct the second push.

Not sure what the answer is.

Nginx not proxying to my node app

I set up dokku on my DigitalOcean vm... super fast setup. Then I created a bare bones express app, added a Procfile, added the git remote, then git pushed.

The app started up:

remote: -----> Build complete!
remote: -----> Deploying dokku-test ...
remote: -----> Application deployed:
remote:        http://dokku-test.lt39.info

Woohoo!

But... accessing http://dokku-test.lt39.info gives me a "Welcome to nginx!" page.

I ssh'd to the vm. docker ps -a:

root@lt39:/home/git/dokku-test# docker ps -a
ID                  IMAGE                       COMMAND                CREATED             STATUS              PORTS               SIZE
98e6ccc7fde1        app/dokku-test:latest       /bin/bash -c /start    22 minutes ago      Up 4 minutes        49153->49153        16.39 kB (virtual 933.4 MB)
910d6d534740        afadbde5307d                /build/builder         22 minutes ago      Exit 0                                  49.02 MB
743a8e534ad7        progrium/buildstep:latest   /bin/bash -c mkdir -   22 minutes ago      Exit 0                                  5.01 MB
11367d432b0b        5988ffa268b4                /bin/bash -c /start    27 minutes ago      Exit 137                                16.39 kB
96e318d7c586        55997d026811                /build/builder         27 minutes ago      Exit 0                                  49.02 MB
d92cf8d41cda        progrium/buildstep:latest   /bin/bash -c mkdir -   27 minutes ago      Exit 0                                  5.01 MB

I verified that curl http://localhost:49153 yields the express app. The /home/git/dokku-test/nginx.conf looks like:

root@lt39:/home/git/dokku-test# cat nginx.conf
upstream dokku-test { server 127.0.0.1:49153; }
server {
  listen      80;
  server_name dokku-test.lt39.info;
  location    / { proxy_pass  http://dokku-test; }
}    

What gives?

What can't it do?

Under things it can't do according README.md:

  • Multi-node. Not a huge leap, but this isn't the project for it. Maybe as Super Dokku.
  • Multitenancy. It's ready for it, but again, probably for Super Dokku.

Does this mean I can't deploy more than 1 node app (or ruby) app at time time, or something else?

@frillip also.

Support per-app custom environments

Heroku allows configuration variables (database passwords, API keys, etc) to be put into the environment of your application so they don't need to be commited to your repository.

Dokku should support this. A first pass would be to simply have an $APP.env file that gets copied into the container and is sourced just before the application starts. The file can be put put on the dokku server manually for now, and integration with sshcommand or other tools can come later.

remote: gzip: stdin: unexpected end of file

Unsure why this is happening:

git push qa master 1.9.3p194 master@4c538ce
Counting objects: 42, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (25/25), done.
Writing objects: 100% (26/26), 51.74 KiB, done.
Total 26 (delta 9), reused 0 (delta 0)
remote: -----> Building test-app ...
remote:
remote: gzip: stdin: unexpected end of file
remote: tar: Child returned status 1
remote: tar: Error is not recoverable: exiting now
remote: Ruby/Rails app detected
remote:
remote: gzip: stdin: unexpected end of file
remote: tar: Child returned status 1
remote: tar: Error is not recoverable: exiting now
remote:
remote: gzip: stdin: unexpected end of file
remote: tar: Child returned status 1
remote: tar: Error is not recoverable: exiting now
remote: /usr/lib/ruby/1.9.1/psych.rb:297:in initialize': No such file or directory - ruby_versions.yml (Errno::ENOENT) remote: from /usr/lib/ruby/1.9.1/psych.rb:297:inopen'
remote: from /usr/lib/ruby/1.9.1/psych.rb:297:in load_file' remote: from /build/buildpacks/heroku-buildpack-ruby/lib/language_pack/ruby.rb:191:inblock (2 levels) in ruby_versions'
remote: from /build/buildpacks/heroku-buildpack-ruby/lib/language_pack/ruby.rb:189:in chdir' remote: from /build/buildpacks/heroku-buildpack-ruby/lib/language_pack/ruby.rb:189:inblock in ruby_versions'
remote: from /usr/lib/ruby/1.9.1/tmpdir.rb:83:in mktmpdir' remote: from /build/buildpacks/heroku-buildpack-ruby/lib/language_pack/ruby.rb:188:inruby_versions'
remote: from /build/buildpacks/heroku-buildpack-ruby/lib/language_pack/ruby.rb:235:in install_ruby' remote: from /build/buildpacks/heroku-buildpack-ruby/lib/language_pack/ruby.rb:67:incompile'
remote: from /build/buildpacks/heroku-buildpack-ruby/lib/language_pack/rails2.rb:41:in compile' remote: from /build/buildpacks/heroku-buildpack-ruby/bin/compile:11:inblock in

'
remote: from /build/buildpacks/heroku-buildpack-ruby/lib/language_pack/base.rb:91:in log' remote: from /build/buildpacks/heroku-buildpack-ruby/bin/compile:10:in'
remote: -----> Build complete!
remote: -----> Deploying test-app ...
remote: -----> Application deployed:
remote: http://test-app.mydomain.com
remote:

Hitting an undefined app URL displays the 'wrong' app

e.g. if you only have one app deployed at foo.dokku.me and for any reason try to hit bar.dokku.me in a browser, you'll see the foo app. While pretty minor, it might be good to display a No Such App page like heroku does, to avoid confusion.

Looks like nginx is routing to either the first or the last servername it knows of if no matching servernames are found. We could fix this by adding a fallthrough server block to the nginx dokku.conf (e.g. with server_name _)

Unable to get Python to work

Following these steps once I try to push I get a Unable to select a buildpack error.

$ ls
Procfile         
hello.py
requirements.txt
remote: -----> Building test-flask ...
remote:        Unable to select a buildpack
remote: -----> Build complete!
remote: -----> Deploying test-flask ...
remote: 
remote: -----> Application deployed:
remote:        http://test-flask.domain.tld

This is with a brand new install after the Python support update.

Nginx not reloading when a new app is pushed

Hello! It's me again. I'm having a problem where Nginx isn't reloading to point to the new app deployed. It just shows another app (but that's not a big deal as it's explained in https://github.com/progrium/dokku/wiki/Recipes). I have to manually issue sudo /etc/init.d/nginx reload so I'm able to see the page load.

I think this is related to the nginx-reloader.conf file, but I tried restarting the instance and still isn't working. How could this be fixed? I tried restarting the nginx-reloader but couldn't find it with the restart command or a script in /etc/init.d. Thanks for your time!

remote: -e:1:in `require': no such file to load -- json (LoadError)

I tried with a simple node and a ruby app and I alwais get this message

remote: -----> Using Ruby version: ruby-2.0.0
remote: -----> Installing dependencies using Bundler version 1.3.2
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
remote:        Fetching gem metadata from https://rubygems.org/..........
remote:        Fetching gem metadata from https://rubygems.org/..
remote:        Installing rack (1.4.1)
remote:        Installing rack-protection (1.2.0)
remote:        Installing tilt (1.3.3)
remote:        Installing sinatra (1.3.3)
remote:        Using bundler (1.3.2)
remote:        Your bundle is complete! It was installed into ./vendor/bundle
remote:        Cleaning up the bundler cache.
remote: -----> WARNINGS:
remote:        you have not declared a ruby version in your Gemfile.
remote:        See https://devcenter.heroku.com/articles/ruby-versions for more information.
remote: -----> Discovering process types
remote:        Procfile declares types -> web
remote:        Default process types for Ruby/Rack -> rake, console, web
remote: -----> Build complete!
remote: -----> Deploying myip-sinatra ...
remote: -e:1:in `require': no such file to load -- json (LoadError)
remote:     from -e:1
remote: -----> Application deployed:
remote:        http://precise64:
remote: 
To [email protected]:myip-sinatra
 * [new branch]      master -> master

on node:

...
remote:        [websocket v1.0.8] Attempting to compile native extensions.
remote:        [websocket v1.0.8] Native extension compilation successful!
remote:        [email protected] /app/node_modules/websocket
remote:        Dependencies installed
remote: -----> Building runtime environment
remote: -----> Discovering process types
remote: -----> Build complete!
remote: -----> Deploying node-sensor ...
remote: 2013/06/20 22:26:58 Error: Error starting container 64895631a217: strconv.ParseUint: parsing "": invalid syntax
remote: -----> Application deployed:
remote:        http://precise64:

Can I 'see' my Rails app in /home/git?

Is it possible to see my Rails app on my server?
I would like to run bundle install on my server to debug the issues I'm seeing.
At the moment I'm adding and removing a test.txt file to be able to refresh the bundle install process.

"Unable to select buildpack" with docker 0.4.4

When I push my test sinatra app I get the following output:

git push dokku

Counting objects: 470, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (391/391), done.
Writing objects: 100% (469/469), 1.17 MiB, done.
Total 469 (delta 42), reused 0 (delta 0)
remote: -----> Building app ...
remote:        Unable to select a buildpack
remote: -----> Build complete!
remote: -----> Deploying app ...
remote: -----> Application deployed:
remote:        http://app.dokku.dyladan.me
remote: 
To [email protected]:app
   71effe7..7cd0e38  master -> master

Here is the code I'm using

config.ru:

require './hello'
run Sinatra::Application

Gemfile:

source 'https://rubygems.org'
gem 'sinatra'

hello.rb:

require 'sinatra'

get '/' do
  "Hello World!"
end

Failed on Ubuntu 12.10

Initially I've treied dokku on Ububui 12.04 and installator failed to complete there.

How to: Install dokku on Linode

Maybe this belongs to the wiki, but for future reference, here is how I got Dokku working on a Linode instance:

Roadmap for 0.4.0 Release

High level goals are refactoring, documentation, and testing. New features include addons and more pre-made images.

In no particular order:

  • Extensive first pass at documentation
  • More extensive testing (tests commands, etc)
  • Integration of slugbuilder/slugrunner
  • Move buildpack integration testing to slugbuilder/slugrunner
  • Heroku-style addon interface
  • Potentially packaged as a Docker image itself
  • Ready to go disk images on multiple cloud platforms
  • Cleanup the app organization and stop messing around in the git bare repo
  • Store applications' config in a git repo

make ec2 ami from post-bootstrap for tests

Running tests on EC2 from Travis CI is the only way to fully test Dokku, but it's a very slow process to bring up and bootstrap a new VM. If we could get a snapshot of it right after bootstrapping then we could speed the tests up by a factor of 2 or 3.

Python Buildpack?

I tried to mess with the Python Buildpack, I added its repo to the appropriate file, ran make build in $HOME/dokku/buildstep, let it build and then pushed a new repo with my Flask Hello World. I get this, however, from the prereceive hook.

$ git push dokku 
Counting objects: 5, done.
Delta compression using up to 8 threads.             
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 335 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: -----> Building dokkutest ...
remote:        Python app detected
remote: cp: cannot stat `/app/!(tmp)': No such file or directory
remote: -----> Build complete!
remote: -----> Deploying dokkutest ...
remote: -----> Application deployed:
remote:        http://dokkutest.dokku.tk
remote: 
To [email protected]:dokkutest
   2851c76..0b0de77  master -> master

Any ideas?

Need to be super user to install?

Installation of Dokku on a fresh Raring box seems to require you to be super user. Should the step $ su be added to the README or am I doing something wrong?

deploy should fail if build fails

Tried deploying a fresh rails app. Some dependencies were missing from buildstep stack so it failed, but it continued to deploy. It should fail if buildstep fails.

Scala buildpack, builds but doesn't deploy

I added the scala build pack to buildstep

https://github.com/heroku/heroku-buildpack-scala

and did a make build. Then I tried to push Heroku's sample app from https://github.com/heroku/scala-play-sample build went well and I got a message showing successful deployment. But it turned out the container wasn't running. I tried to manualy start it but I got a weird error message. Something like "-Xss512m command not found" which I presume is related to parsing the Procfile.
This is as far as I got.

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.