Coder Social home page Coder Social logo

dokku-alt / dokku-alt Goto Github PK

View Code? Open in Web Editor NEW
1.2K 1.2K 96.0 53.7 MB

Dokku on steroids (this project is no longer actively maintained)

License: MIT License

Makefile 3.30% Shell 86.26% Ruby 2.80% Groff 0.97% Go 1.59% Python 0.40% JavaScript 2.25% HTML 1.06% Nginx 0.13% PHP 0.62% Java 0.50% CSS 0.12%

dokku-alt's Introduction

Dokku Alternative

Unmaintained, Migrate to Dokku as soon as possible

Join the chat at https://gitter.im/dokku-alt/dokku-alt

Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen. It's a fork of the original dokku. The idea behind this fork is to provide complete solution with plugins covering most use-cases which are stable and well tested.

Features

  • Debian-based installation and upgrade!
  • Git deploy
  • Built-in support for MariaDB, PostgreSQL, MongoDB and Redis databases
  • Built-in support for Dockerfile
  • Built-in support for service-only applications
  • Built-in support for domains and redirects
  • Built-in support for TLS and wildcard certificates
  • Built-in support for Docker-args and container persistent volumes
  • Built-in support for container's TOP
  • Built-in support for foreman-based Procfile
  • Data volumes with host-based volumes
  • Preboot / zero-downtime deploy
  • Enter and exec commands in already running containers
  • Access-control: deploy only keys
  • Create-only application
  • HTTP-Basic Auth support
  • Simple SSL commands
  • SPDY and HSTS
  • Configure NGINX listen address and proxy read timeout
  • Custom buildstep image
  • Support better image tagging (yet compatible with dokku)
  • Support for running buildstep-based applications as non-root user
  • Integration with dokku-alt-manager (https://github.com/romaninsh/dokku-alt-manager)
  • Run dokku-alt in service in docker container (BETA)

Planned features:

  • Nginx proxy in container with automatic service reload
  • Support for RabbitMQ and Memcached
  • Support for custom nginx templates
  • Support for application scaling
  • Support for CHECKS as described in https://labnotes.org/zero-downtime-deploy-with-dokku/
  • Full and incremental backup
  • Application migration

Requirements

Assumes that you use Ubuntu 14.04 LTS right now. Ideally, you should have a domain ready to point to your host. It's designed for and is probably best to use a fresh VM. The debian package will install everything it needs.

Installing

$ sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/dokku-alt/dokku-alt/master/bootstrap.sh)"

Installing (with force-yes)

Sometimes you may want to install dokku-alt in a completely non-interactive way. Now you can do it. Simply boostrap.sh without terminal:

$ sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/dokku-alt/dokku-alt/master/bootstrap.sh)" < /dev/null

Configuring

If you use the bootstrap script from above, at the end it will fireup ruby installation script. Point your browser to http://<ip>:2000/ and finish configuration.

That's it!

Manual configuration

Set up a domain and a wildcard domain pointing to that host. Make sure /home/dokku/VHOST is set to this domain. By default it's set to whatever hostname the host has. This file is only created if the hostname can be resolved by dig (dig +short $(hostname -f)). Otherwise you have to create the file manually and set it to your preferred domain. If this file still is not present when you push your app, dokku will publish the app with a port number (i.e. http://example.com:49154 - note the missing subdomain).

You'll have to add a public key associated with a username by doing something like this from your local machine:

$ cat ~/.ssh/id_rsa.pub | ssh dokku.me sudo dokku access:add

Upgrade and beta releases

Unlike dokku, this script uses the debian packaging system (deb). To upgrade to the latest version, simply execute: sudo apt-get update && sudo apt-get install dokku-alt.

Alongside the normal (stable) releases we distribute as well beta (bleeding edge). To switch to beta simply execute: sudo apt-get update && sudo apt-get install dokku-alt-beta. It will replace the stable dokku-alt and switch to beta.

Migration from dokku

It should be possible, it should mostly work, but it's not tested and advised. VPS's are very cheap this days so fire-up new machine and setup dokku-alt from scratch.

Deploy an App

Now you can deploy apps on your Dokku. Let's deploy the Heroku Node.js sample app. All you have to do is add a remote to name the app. It's created on-the-fly. Note that you must use the username dokku@yourhostname.com:your-repository-name if you used the boostrap.sh script to install dokku-alt.

$ git clone https://github.com/heroku/node-js-sample
$ cd node-js-sample
$ git remote add dokku [email protected]:node-js-app
$ git push dokku master
Counting objects: 296, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (254/254), done.
Writing objects: 100% (296/296), 193.59 KiB, done.
Total 296 (delta 25), reused 276 (delta 13)
-----> Building node-js-app ...
       Node.js app detected
-----> Resolving engine versions

... blah blah blah ...

-----> Application deployed:
       http://node-js-app.progriumapp.com

You're done!

Right now Buildstep supports buildpacks for Node.js, Ruby, Python, and more. It's not hard to add more, go add more! Please check the documentation for your particular build pack as you may need to include configuration files (such as a Procfile) in your project root.

Dokku-alt-manager

It's a web interface to easily manage your dokku-alt instance. To install manager, simply run:

dokku manager:install

You can enable or disable it anytime:

dokku manager:enable
dokku manager:disable

Or even uninstall if you prefer command line access (it will also wipe used database):

dokku manager:uninstall

Dokku-alt as service in Docker container (BETA)

Dokku-alt can be run using Docker-in-Docker approach (https://github.com/jpetazzo/dind). It requires you to run the dokku-alt container in privileged mode (with full access to host), because dokku-alt uses its own Docker daemon to serve applications. It's still considered beta, but should be pretty safe solution and robust. It's best to use for play with dokku-alt on other not-supported systems (CentOS, RedHat, Debian) or by simply trying how it works.

All dokku-alt services (SSH, Nginx, Dokku daemon) are run in container.

Create persistent data storage

docker run --volume=/home/dokku --volume=/var/lib/docker --name=dokku-alt-data busybox:latest

Start dokku-alt service in container

docker run -d --name=dokku-alt --hostname=my-domain.com --volumes-from=dokku-alt-data --publish=22:22 --publish=80:80 --publish=443:443 --privileged ayufan/dokku-alt:latest

You can adjust the exposed ports as described in Docker documentation.

Check dokku-alt logs to see if anything started correctly:

docker logs dokku-alt-demo

At the end, you should see something like this:

dokku.1 | SSH Login:
dokku.1 |   user: root
dokku.1 |   password: lfMUjxYEvqpRRLY6
dokku.1 |   ip: 10.0.42.1 172.17.2.213
dokku.1 | Starting dokku daemon...

This is a temporary root password to access the container and add your access keys (using dokku access:add as described). This password changes every container restart.

To enter the container shell from the server's terminal (the same which is running docker with dokku-alt) run ssh:

If everything was done right, you should see the container's prompt. By exposing ports in docker run to the outside world you can also access dokku-alt externally.

To upgrade container to newer version simply kill old container and rerun your docker run command:

docker kill dokku-alt
docker pull ayufan/dokku-alt:latest
docker run -d --name=dokku-alt --hostname=my-domain.com --volumes-from=dokku-alt-data --publish=22:22 --publish=80:80 --publish=443:443 --privileged ayufan/dokku-alt:latest

Dockerfile images

The key feature of dokku-alt is built-in support for Dockerfiles, the docker build process. It allows you to create more advanced and more repetitive application environments. To use Dockerfile simply put Dockerfile in root of the application, dokku-alt will detect it and build application according to specification in Dockerfile.

Dockerfile-based application can (but not required) expose a web-application port. dokku-alt will check if port 80, 8080 or 5000 is exposed. If it is, it will update the assigned vhost and reconfigure nginx to forward all incoming traffic.

Using Dockerfile, you can build service-only applications. Simply don't expose any public facing ports.

Example Dockerfile application: https://github.com/ayufan/dokku-alt-phpmyadmin

Nginx and redirects

Dokku-alt has built-in support for additional domains and url redirects. By specifying redirects, any client using that address will automatically be redirected to the first domain assigned to the application.

Remote commands

Dokku commands can be run over ssh. Anywhere you would run dokku <command>, just run ssh -t [email protected] <command> The -t is used to request a pty. It is highly recommended to do so. To avoid the need to type the -t option each time, simply create/modify a section in the .ssh/config on the client side, as follows :

Host progriumapp.com
RequestTTY yes

Run a command in the app environment

It's possible to run commands in the environment of the deployed application:

$ dokku run node-js-app ls -alh
$ dokku run <app> <cmd>

Removing a deployed app

SSH onto the server, then execute:

$ dokku delete myapp

Create-only application

Dokku-alt allows you to create an application before pushing it. It can be useful when you want to specify additional config variables or assign databases. Simply execute:

$ dokku create mynewapp

It's also possible to disable auto-application creation on push. Add to ~/dokkurc:

export DOKKU_DISABLE_AUTO_APP_CREATE=1

From now on you will have to do dokku create before pushing.

Allowing push-access (deploy only) access for dokku

Dokku-alt allows you to add additional public keys to applications. The specific case is to add special deploy-only key, used for example by Countinous Integration (ie. Jenkins). Key added as deploy-only can only be used to git push specific application. It will not allowed to execute any dokku commands. You can add an ssh key and give it explicit access to one or many applications.

Add locally:

$ cat .ssh/id_rsa.pub | dokku deploy:allow myapp

Add key remotely:

$ cat .ssh/id_rsa.pub | ssh dokku@dokku deploy:allow myapp

To later revoke key execute:

$ dokku deploy:revoke myapp FINGERPRINT

You can also list all fingerprints allowed to deploy an application:

$ dokku deploy:list myapp

Add a new admin user:

$ cat .ssh/id_rsa.pub | dokku access:add

Revoke permissions for admin user:

$ dokku access:revoke FINGERPRINT

Environment variable management

Typically, an application will require some environment variables to run properly. Environment variables may contain private data, such as passwords or API keys, so it is not recommend to store them in your application's repository.

The config plugin provides the following commands to manage your variables:

config <app> - display the config vars for an app  
config:get <app> KEY - display a config value for an app  
config:set <app> KEY1=VALUE1 [KEY2=VALUE2 ...] - set one or more config vars
config:unset <app> KEY1 [KEY2 ...] - unset one or more config vars

Available environment variables

Image tagging

When you successfully deploy an app, you can tag it with a name/version. This lets you quickly roll back to that image in the event of failure in a later deployment.

$ dokku tag:add gitlab v6.9.0
=====> Tagged latest image of dokku/gitlab as v6.9.0
$ dokku tag:list gitlab
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
dokku/gitlab        build               fc3baf1216d2        4 weeks ago         954.9 MB
dokku/gitlab        latest              fc3baf1216d2        4 weeks ago         954.9 MB
dokku/gitlab        release             fc3baf1216d2        4 weeks ago         954.9 MB
dokku/gitlab        v6.9.0              fc3baf1216d2        4 weeks ago         954.9 MB
$ dokku deploy gitlab release <-- it will deploy GIT head
$ dokku deploy gitlab v6.9.0 <-- it will deploy tagged image

Databases

Dokku-alt has built-in support for all modern database engines: MariaDB (former MySQL), PostgreSQL and MongoDB. The database image will be downloaded and provisioned when first used.

First create a database:

$ dokku mariadb:create test-db
-----> MariaDB database created: test-db

Second link the database to an app:

$ dokku mariadb:link node-js-sample test-db
-----> Releasing node-js-sample ...
-----> Deploying node-js-sample ...
-----> Shutting down old containers
=====> Application deployed:
    http://node-js-sample.ayufan.eu

Verify the application environment variables:

$ dokku config node-js-sample
=== node-js-sample config vars ===
DATABASE_URL:  mysql2://node-js-sample:random-password@mariadb:3306/test-db

To use a different database engine, simply replace mariadb with postgresql or mongodb.

Preboot / zero-downtime boot

Similar to functionality provided by https://devcenter.heroku.com/articles/labs-preboot dokku-alt supports zero-downtime. To enable zero-downtime deployment, execute command: dokku preboot:enable APP. Alongside with preboot, there's a checks plugin based on https://labnotes.org/zero-downtime-deploy-with-dokku/. For now, it simply checks if the application started serving requests. If the checks module fails, it will not replace the application.

Preboot and checks can be configured using a few environment variables:

  • PREBOOT_WAIT_TIME - number of seconds to wait for container boot (default 5s)
  • PREBOOT_COOLDOWN_TIME - number of seconds to wait finish container request processing (default 30s)
  • DOKKU_CHECKS_WAIT - number of seconds to wait before request retries (default 10s)
  • DOKKU_CHECKS_TIMEOUT - number of seconds to wait for each response (default 20s)
  • DOKKU_CHECKS_RETRY - number of retries (default 3)

Data volumes

Docker allows you to have persistent data storage. Dokku-alt exposes this feature as Data Volumes. You can create unlimited number of data volumes and any data volume can be attached to unlimited number of apps. Simply create a data volume and specify container paths which you want to be persistant.

First, create a data volume:

$ dokku volume:create shared-test-volume /app/logs /app/tmp /app/uploads
-----> Volume created: volume_data_shared-test-volume

Second, link the volume to an app:

$ dokku volume:link node-js-sample shared-test-volume
-----> Volume shared-test-volume linked to an aplication: node-js-sample
-----> Releasing node-js-sample ...
-----> Deploying node-js-sample ...
-----> Shutting down old containers
=====> Application deployed:
    http://node-js-sample.ayufan.eu

It is just simple as this.

Host-based volumes

Dokku-alt allows you to bind host-based volumes in a very simple manner. To use this feature, you have to be logged as root and then simply type:

dokku volume:create host-based-volume /path/to/host/volume:/path/to/volume/in/container

HTTP-Basic Auth support

Dokku-alt allows you to secure any application with HTTP-Basic Auth. There are a few commands that makes it happen:

htpasswd:add <app> <user>                       Add http-basic auth user
htpasswd:disable <app>                          Remove http-basic Auth
htpasswd:remove <app> <user>                    Remove user

If you want to enable and add a new user, simply type the command below and when prompted, type your password twice:

dokku htpasswd:add myapp myuser

You can also pipe the password:

echo mypass | dokku htpasswd:add myapp myuser

To revoke user's permission:

dokku htpasswd:remove myapp

To remove HTTP-Basic Auth completely:

dokku htpasswd:disable myapp

TLS support

Dokku provides easy TLS support out of the box. To enable TLS connection to your application, copy the .crt and .key files into the /home/dokku/:app/ssl folder (notice, file names should be server.crt and server.key, respectively). Redeployment of the application will be needed to apply TLS configuration. Once it's redeployed, the application will be accessible by https:// (redirection from http:// is applied as well).

TLS support

Dokku-alt extends this even further by allowing you to use command line interface for certificates:

ssl:generate <app>                              Generate certificate signing request for an APP
ssl:certificate <app>                           Pipe signed certifcate with all intermediates for an APP
ssl:forget <app>                                Wipes certificate for an APP
ssl:info <app>                                  Show info about certifcate and certificate request
ssl:key <app>                                   Pipe private key for an APP

First use: dokku ssl:generate myapp to generate certificate signing request (CSR). At the end of process you will receive BEGIN CERTIFICATE REQUEST which you can ten copy-n-paste to your SSL signer (ie. http://startssl.com).

When you receive your signed certificate pipe it with ALL INTERMEDIATES to dokku ssl:certificate myapp. If done correctly you have SSL enabled for your site.

cat mycert.pem intermediate.pem ca.pem | dokku ssl:certificate myapp

If it happens that you have already created certificate you can use it, by piping your UNENCRYPTED your certificate and your private key:

cat mycert.pem intermediate.pem ca.pem | dokku ssl:certificate myapp
cat mycert.key | dokku ssl:key myapp

To view asigned certificate:

dokku ssl:info myapp

HSTS support

HTTP Strict Transport Security (HSTS) is a web security policy mechanism whereby a web server declares that complying user agents (such as a web browser) are to interact with it using only secure HTTPS connections. Once enabled all further communication will be done over TLS only, there's no revert mechanism. As this is additional security feature you have to do it by hand. To enable HSTS for site use:

dokku config:set myapp DOKKU_ENABLE_HSTS=1

Serve an app over HTTP as well

By default dokku-alt for all TLS-enabled apps will create redirects which requires user to use https://. In some cases it maybe required to allow http:// access which is potentially insecure. To enable simulatenous HTTP and HTTPS set specific config:

dokku config:set myapp DOKKU_ENABLE_HTTP_HOST=1

dokkurc Configuration

You can fine-tune some aspects of Dokku behaviour and its plugins by setting variables in dokkurc file placed in Dokku root directory – usually /home/dokku. dokkurc is sourced by the main dokku script.

Example:

export DOKKU_DISABLE_AUTO_APP_CREATE=1
export BUILDSTEP_IMAGE="ayufan/dokku-alt-buildstep:foreman"

Known configuration variables

  • DOKKU_DISABLE_AUTO_APP_CREATE – when set to 1, applications won't be automatically created on push; see Create only application.
  • BUILDSTEP_IMAGE – buildstep image to be used by Docker, defaults to ayufan/dokku-alt-buildstep:foreman.
  • MARIADB_IMAGE – Docker image to be used for MariaDB plugin, defaults to ayufan/dokku-alt-mariadb.
  • MONGODB_IMAGE – Docker image to be used for MongoDB plugin, defaults to ayufan/dokku-alt-mongodb.
  • POSTGRESQL_IMAGE – Docker image to be used for PostgreSQL plugin, defaults to ayufan/dokku-alt-postgresql.
  • REDIS_IMAGE – Docker image to be used for Redis plugin, defaults to ayufan/dokku-alt-redis.
  • DOKKU_LISTEN_IPV4 - Set the IPV4 address on which NGINX will listen for requests
  • DOKKU_LISTEN_IPV6 - Set the IPV6 address on which NGINX will listen for requests
  • DOKKU_FORCE_ENABLE_HSTS - Force to enable HSTS header (validity for one year) for all TLS-enabled apps
  • DOKKU_DISABLE_NGINX_X_FORWARDED - Disable setting of X-Forwarded headers by nginx, useful for CDN installations.

MariaDB specific

These parameters should only be changed when you are using a MariaDB image that has a different setup.

  • MARIADB_PORT - MariaDB listen port, defaults to 3306
  • MARIADB_COMMAND - MariaDB startup command for Docker, defaults to /usr/bin/start_mariadb.sh
  • MARIADB_CONTAINER_VOLUME - Where the data volume gets mounted in the MariaDB container, defaults to /opt/mysql
  • MARIADB_CONTAINER_PASSWORD - Where the password file gets mounted in the MariaDB container, defaults to /opt/mysql_password

MongoDB specific

These parameters should only be changed when you are using a MongoDB image that has a different setup.

  • MONGODB_PORT - MongoDB listen port, defaults to 27017
  • MONGODB_COMMAND - MongoDB startup command for Docker, defaults to /usr/bin/start_mariadb.sh
  • MONGODB_CONTAINER_VOLUME - Where the data volume gets mounted in the MongoDB container, defaults to /opt/mongodb
  • MONGODB_CONTAINER_PASSWORD - Where the password file gets mounted in the MongoDB container, defaults to /opt/mongodb_password

PostgreSQL specific

These parameters should only be changed when you are using a PostgreSQL image that has a different setup.

  • POSTGRESQL_USER - PostgreSQL admin user, defaults to root
  • POSTGRESQL_PORT - PostgreSQL listen port, defaults to 5432
  • POSTGRESQL_COMMAND - PostgreSQL startup command for Docker, defaults to /usr/bin/start_pgsql.sh
  • POSTGRESQL_CONTAINER_VOLUME - Where the data volume gets mounted in the PostgreSQL container, defaults to /opt/postgresql
  • POSTGRESQL_CONTAINER_PASSWORD - Where the password file gets mounted in the PostgreSQL container, defaults to /opt/postgresql_password

Redis specific

These parameters should only be changed when you are using a Redis image that has a different setup.

  • REDIS_PORT - Redis listen port, defaults to 6379
  • REDIS_COMMAND - Redis startup command for Docker, defaults to /usr/bin/start_redis.sh
  • REDIS_CONTAINER_VOLUME - Where the data volume gets mounted in the Redis container, defaults to /var/lib/redis

Help

$ dokku help
apps:disable <app>                              Disable specific app
apps:enable <app>                               Re-enable specific app
apps:list                                       List app
apps:restart <app>                              Restart specific app (not-redeploy)
apps:start <app>                                Stop specific app
apps:status <app>                               Status of specific app
apps:stop <app>                                 Stop specific app
apps:top <app> [args...]                        Show running processes
backup:export [file]                            Export dokku configuration files
backup:import [file]                            Import dokku configuration files
config <app>                                    display the config vars for an app
config:get <app> KEY                            display a config value for an app
config:set <app> KEY1=VALUE1 [KEY2=VALUE2 ...]  set one or more config vars
config:unset <app> KEY1 [KEY2 ...]              unset one or more config vars
delete <app>                                    Delete an application
domains:get <app>                               Get domains for an app
domains:redirect:get <app>                      Get redirect domains for an app
domains:redirect:set <app> <domains...>         Set redirect app domains
domains:set <app> <domains...>                  Set app domains
enter <app>                                     Enter into currently running container
exec <app> <cmd>                                Execute command in currently running container
help                                            Print the list of commands
logs <app> [-t] [-f]                            Show the last logs for an application (-t or -f follows)
mariadb:console <app> <db>                      Launch console for MariaDB container
mariadb:create <db>                             Create a MariaDB database
mariadb:delete <db>                             Delete specified MariaDB database
mariadb:dump <app> <db>                         Dump database for an app
mariadb:info <app> <db>                         Display application informations
mariadb:link <app> <db>                         Link database to app
mariadb:list <app>                              List linked databases
mariadb:unlink <app> <db>                       Unlink database from app
mongodb:console <app> <db>                      Launch console for MongoDB container
mongodb:create <db>                             Create a MongoDB database
mongodb:delete <db>                             Delete specified MongoDB database
mongodb:dump <app> <db> <collection>            Dump database collection in bson for an app
mongodb:export <app> <db> <collection>          Export database collection for an app
mongodb:import <app> <db> <collection>          Import database collection for an app
mongodb:info <app> <db>                         Display application informations
mongodb:link <app> <db>                         Link database to app
mongodb:list <app>                              List linked databases
mongodb:unlink <app> <db>                       Unlink database from app
plugins-install                                 Install active plugins
plugins                                         Print active plugins
postgresql:console <app> <db>                   Launch console for PostgreSQL container
postgresql:create <db>                          Create a PostgreSQL database
postgresql:delete <db>                          Delete specified PostgreSQL database
postgresql:dump <app> <db>                      Dump database for an app
postgresql:info <app> <db>                      Display application informations
postgresql:link <app> <db>                      Link database to app
postgresql:list <app>                           List linked databases
postgresql:unlink <app> <db>                    Unlink database from app
preboot:cooldown:time <app> <secs>              Re-enable specific app
preboot:disable <app>                           Stop specific app
preboot:enable <app>                            Stop specific app
preboot:status <app>                            Status of specific app
preboot:wait:time <app> <secs>                  Restart specific app (not-redeploy)
rebuild:all                                     Rebuild all apps
rebuild <app>                                   Rebuild an app
redis:create <app>                              Create a Redis database
redis:delete <app>                              Delete specified Redis database
redis:info <app>                                Display application information
run <app> <cmd>                                 Run a command in the environment of an application
tag:add <app> <tag>                             Tag latest running image using specified name
tag:list <app>                                  List all image tags
tag:rm <app> <tag>                              Tag latest running image using specified name
url <app>                                       Show the URL for an application
version                                         Print dokku's version
volume:create <name> <paths...>                 Create a data volume for specified paths
volume:delete <name>                            Delete a data volume
volume:info <name>                              Display volume information
volume:link <app> <name>                        Link volume to app
volume:list:apps <name>                         Display apps linked to volume
volume:list                                     List volumes
volume:unlink <app> <name>                      Unlink volume from app

Additional Help

dokku volume:help

It works for all ranges :)

dokku mariadb:help
dokku ssl:help

FAQ / Support

You can use Github Issues.

How can I use custom domains as www.myapp.com?

dokku domains:set myapp www.myapp.com

How do I connect my app to access an external database server?

"I deployed my Rails application on a fresh new machine using dokku-alt but I already own a bare metal, replicated PostgreSQL server that's reachable from the dokku host as it's on the same network. How do I connect?"

Run the following:

dokku config:set <app> DATABASE_URL=postgresql://user:password@dbserver-ip:5432/DBNAME

You have to feed application with your DATABASE_URL. You can even use databases from heroku.

Linking to other containers

You can create file: /home/dokku/APPNAME/DOCKER_ARGS and fill it with additional arguments as described in http://docs.docker.com/reference/run/. These arguments will be injected when deploying the application or invoking dokku run.

Out of memory

The following error typically occurs on boxes with 512MB of memory:

runtime: panic before malloc heap initialized
fatal error: runtime: cannot allocate heap metadata

Run the following (it will create 512MB swap file, you can adjust it for your needs):

dd if=/dev/zero of=/extraswap bs=1M count=512
mkswap /extraswap

Add it to /etc/fstab:

/extraswap         none            swap    sw                0       0

Turn it on:

swapon -a

Fix Shellshock vulnerability

Shellshock (CVE-2014-6271, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187) is a vulnerability in GNU's bash shell that gives attackers access to run remote commands on a vulnerable system. More info you can find there: https://shellshocker.net/.

  1. sudo dokku plugins-install

  2. If you use Dockerfile you need for every app which uses it redownload image names used by FROM. Then issue docker pull every image used by FROM: docker pull ubuntu:trusty. You don't have to do it for buildstep-based images, it were done by plugins-install. Please check Dockerfile of the app:

     FROM ubuntu:trusty
     RUN ...
    

    Then run in server's terminal: docker pull ubuntu:trusty

  3. Rebuild all applications with cache wipe: dokku rebuild:all:force.

  4. Voila. Your are secure!

Components

License

MIT

dokku-alt's People

Contributors

aegypius avatar alexbeletsky avatar amaltson avatar asm89 avatar ayufan avatar eugeneware avatar fcoury avatar grigio avatar jaseg avatar jazzzz avatar jeffutter avatar jezdez avatar jlachowski avatar jnv avatar joliv avatar josegonzalez avatar kloadut avatar leemhenson avatar luxifer avatar mjonuschat avatar myhro avatar osiloke avatar plietar avatar progrium avatar rnorth avatar scottatron avatar silasb avatar synthomat avatar that0n3guy avatar wingrunr21 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

dokku-alt's Issues

elasticsearch plugin for dokku-alt?

Is anyone using elasticsearch with dokku-alt? I tried using jedez/dokku-elasticsearch-plugin, but when I restarted my machine I'm getting the following error. Trying to figure out if it's an issue with the plugin or not..

2014/09/27 22:07:27 json: cannot unmarshal array into Go value of type map[string]interface {}

Purging cache with Ruby

Hi,
I just updated to the newest beta of dokku-alt (using the debian repo),
and when deploying, buildstep clears the cache by whatever reason.

This is annoying because:

  • it installs all the gems from scratch
  • it pre-compiles all the assets from scratch

Is there a way I can debug this?

remote: -----> Building maggie using buildstep...
remote: -----> Installing ENV in build environment ...
remote:        Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.1.2
remote: -----> Installing dependencies using 1.6.3
remote:        Purging Cache. Changing stack from  to
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
remote:        installing your bundle as root will break this application for all non-root
remote:        users on this machine.
remote:        Fetching gem metadata from https://rubygems.org/.........
remote:        Fetching additional metadata from https://rubygems.org/..
remote:        Fetching git://github.com/codebrew/backbone-rails.git
remote:        Using json 1.8.1
remote:        Installing minitest 5.4.1
remote:        Installing i18n 0.6.11
remote:        Installing rake 10.3.2
...
remote:        Your bundle is complete!
remote:        Gems in the groups development and test were not installed.
remote:        It was installed into ./vendor/bundle
remote:        Post-install message from haml:
remote:        HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
remote:        your application:
remote:        * Support for Ruby 1.8.6 dropped
remote:        * Support for Rails 2 dropped
remote:        * Sass filter now always outputs <style> tags
remote:        * Data attributes are now hyphenated, not underscored
remote:        * html2haml utility moved to the html2haml gem
remote:        * Textile and Maruku filters moved to the haml-contrib gem
remote:        For more info see:
remote:        http://rubydoc.info/github/haml/haml/file/CHANGELOG.md
remote:        Bundle completed (57.67s)
remote:        Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        I, [2014-09-23T17:18:52.517065 #1180]  INFO -- : Writing /build/app/public/assets/application-020858c2321257a19aaff5d9928e6549.js
remote:        I, [2014-09-23T17:18:59.986074 #1180]  INFO -- : Writing /build/app/public/assets/application-54229ea7dff32d92be7f0cfdb8b14d9b.css
remote:        Asset precompilation completed (23.89s)
remote:        Cleaning assets
remote:        Running: rake assets:clean
remote:
remote: -----> Discovering process types
remote:        Procfile declares types -> web, worker, mail_forwarder
remote:        Default process types for Ruby -> rake, console, web, worker
remote: Sending build context to Docker daemon 2.048 kB
remote: Sending build context to Docker daemon
remote: Step 0 : FROM dokku/maggie:build
remote:  ---> 22c64db7c757
remote: Step 1 : ENV GIT_REV effb1e87054008f404052282932b6912bfcd8569
remote:  ---> Running in f21a5f0dbf3b
remote:  ---> 178787139c10
remote: Removing intermediate container f21a5f0dbf3b
remote: Successfully built 178787139c10
remote: -----> Releasing maggie ...
remote: -----> Deploying maggie ...
remote: -----> Shutting down old containers

Hangs on ssh commands

If I try and execute a dokku command over ssh the process hangs on 'Deploying n'.

ssh [email protected] config:set app-production PREBOOT_WAIT_TIME=8
-----> Setting config vars and restarting app-production
PREBOOT_WAIT_TIME: 8
-----> Releasing app-production ...
-----> Deploying app-production ...

dokku alt and dokku-apt

I want to install custom apt dependencies on my built containers (in particular i need graphicsmagick on some of my containers). I tried using dokku-apt (https://github.com/F4-Group/dokku-apt) but had no luck. Is there a pre-build hook in dokku-alt?

Right now I am using a custom buildstep container with gm integrated.

What would be the best way to accomplish such a task?

Service Unavailable after deploying simple php app

I am new to dokku and I am struggling to get a simple php app to work with dokku-alt. I am deploying a simple php app composed only by a index.php file with the following content

<?php
echo phpinfo();

Deploying this app to dokku-alt I get the following output which seems ok:

    Counting objects: 5, done.
    Delta compression using up to 2 threads.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (5/5), 469 bytes | 0 bytes/s, done.
    Total 5 (delta 0), reused 0 (delta 0)
    remote: Cloning into '/tmp/tmp.nSe3hSy0Vi'...
    remote: done.
    remote: HEAD is now at 0b7a307... tett
    -----> Building php_app using buildstep...
    -----> Installing ENV in build environment ...
           PHP app detected

     !     WARNING: No composer.json found.
           Using index.php to declare PHP applications is considered legacy
           functionality and may lead to unexpected behavior.

    -----> No runtime requirements in composer.json, defaulting to PHP 5.6.0.
    -----> Installing system packages...
           - PHP 5.6.0
           - Apache 2.4.10
           - Nginx 1.6.0
    -----> Installing PHP extensions...
           - zend-opcache (automatic; bundled, using 'ext-zend-opcache.ini')
    -----> Installing dependencies...
           Composer version e6165e649524f2d8edec6101fd740dd4dfeef7cc 2014-09-23 14:19:23
           Loading composer repositories with package information
           Installing dependencies
           Nothing to install or update
           Generating optimized autoload files
    -----> Preparing runtime environment...
           NOTICE: No Procfile, defaulting to 'web: vendor/bin/heroku-php-apache2'
    -----> Discovering process types
           Procfile declares types -> web
           Default process types for PHP -> web
    remote: Sending build context to Docker daemon 2.048 kB
    remote: Sending build context to Docker daemon 
    Step 0 : FROM dokku/php_app:build
     ---> 1866975f8942
    Step 1 : ENV GIT_REV 0b7a3072cc4573c88af424f0a337e60736d60a6c
     ---> Running in 0997de6864a6
     ---> 1763cb0a61ae
    Removing intermediate container 0997de6864a6
    Successfully built 1763cb0a61ae
    -----> Releasing php_app ...
    -----> Deploying php_app ...
    -----> Shutting down old containers
    =====> Application deployed:
           http://php_app.apps1.ipleiria.pt
    -----> Cleaning up ...
    To [email protected]:php_app
       7629c89..0b7a307  develop -> master

After trying to access to application with the url php_app.apps1.ipleiria.pt I get Service Unavalaible message. In logs I get the following error:

    11:49:43 web.1  | started with pid 9
    11:49:44 web.1  | Booting on port 5000...
    11:49:44 web.1  | Starting php-fpm...
    11:49:44 web.1  | Starting httpd...
    11:52:42 web.1  | [Wed Sep 24 11:52:42.177832 2014] [proxy:error] [pid 87:tid 140223625643776] (13)Permission denied: AH02454: FCGI: attempt to connect to Unix domain socket /tmp/heroku.fcgi.5000.sock (heroku-fcgi) failed
    11:52:42 web.1  | [Wed Sep 24 11:52:42.178104 2014] [proxy:error] [pid 87:tid 140223625643776] AH00959: ap_proxy_connect_backend disabling worker for (heroku-fcgi) for 60s
    11:52:42 web.1  | [Wed Sep 24 11:52:42.178145 2014] [proxy_fcgi:error] [pid 87:tid 140223625643776] [client 172.17.42.1:56757] AH01079: failed to make connection to backend: httpd-UDS
    11:52:42 web.1  | 172.17.42.1 - - [24/Sep/2014:11:52:42 +0000] "GET / HTTP/1.1" 503 299 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.122 Safari/537.36"

Can somebody help me with that? Is this something I miss to configure?

Best regards

multiple docker args (environment variables with whitespace)

How do you specify multiple docker args with dokku config:set?

Example:

-v /opt/foo/data:/app/data -v /opt/foo/logs:/app/logs

None of the following commands work for me

dokku config:set myapp DOCKER_ARGS=-v /opt/foo/data:/app/data -v /opt/foo/logs:/app/logs
dokku config:set myapp DOCKER_ARGS="-v /opt/foo/data:/app/data -v /opt/foo/logs:/app/logs"
dokku config:set myapp DOCKER_ARGS='-v /opt/foo/data:/app/data -v /opt/foo/logs:/app/logs'
dokku config:set myapp 'DOCKER_ARGS="-v /opt/foo/data:/app/data -v /opt/foo/logs:/app/logs"'

PostgreSQL data persistence

The PostgreSQL plugin has a major bug that makes all application databases non-persistent. When the container is being run the data-volumes are /opt/postgresql and /opt/postgresql_password. On the first start of the postgresql container the original /var/lib/postgresql data directory gets copied to the volume and and initialized flag is being set (which gets persisted).

But the PostgreSQL Server and all commands executed in start_pgsql.sh work with a data directory of /var/lib/postgresql/9.1/mainwhich is not on a data volume.

Needed enhancement for nginx.conf

The nginx.conf is regenerated for every deployment (I'm guessing because the port number changes?) I have to manually modify the nginx.conf to allow server-sent events to work properly and restart the nginx service. It would be nice to be able to specify nginx directives somehow and have it inserted into the nginx.conf file for a particular app.

It seems like this is a much desired enhancement even on the dokku branch ( see dokku/dokku#271)

Cannot link to postgresql database due to role already existing

Not sure how my postgresql got into this state, but currently when I try to link my app to a database, it says the role already exists. Unfortunately this leaves me in a state where I cannot link to the database or even get into the database to attempt to delete the role:

hhwangbo@hhwangbo-U36SD:~/Documents/SimCon$ ssh dokku postgresql:delete simcon
DROP DATABASE
-----> PostgreSQL database deleted: simcon
hhwangbo@hhwangbo-U36SD:~/Documents/SimCon$ ssh dokku postgresql:create simcon
CREATE DATABASE
-----> PostgreSQL database created: simcon
hhwangbo@hhwangbo-U36SD:~/Documents/SimCon$ ssh dokku postgresql:link simcon simcon
ERROR:  role "simcon" already exists
hhwangbo@hhwangbo-U36SD:~/Documents/SimCon$ ssh dokku postgresql:dump simcon simcon
simcon: database is not linked to simcon
hhwangbo@hhwangbo-U36SD:~/Documents/SimCon$ ssh dokku postgresql:console simcon simcon
simcon: database is not linked to simcon
hhwangbo@hhwangbo-U36SD:~/Documents/SimCon$ ssh dokku postgresql:info simcon simcon
simcon: database is not linked to simcon

Private Repository

I have a php application that requires several composer packages that are from the Cartalyst private repository and they fail to install with composer.

Is there a way to get/generate a public key for the application so it can be authorized with the private repo?

PG::InsufficientPrivilege: ERROR: permission denied to create extension "hstore"

I have a Rails application and a migration that runs :

execute("CREATE EXTENSION IF NOT EXISTS hstore")

But after creating a postgresql database using :

dokku postgresql:create appdb

and linking it to the app using :

dokku postgresql:link app appdb

I run:

dokku run app rake db:migrate

And I get this error :

Migrating to CreateMetaTagsList (20140919122507)
== 20140919122507 CreateMetaTagsList: migrating ===============================
-- create_table(:meta_tags_lists)
   -> 0.0067s
== 20140919122507 CreateMetaTagsList: migrated (0.0072s) ======================

Migrating to CreateParaComponents (20140926102843)
== 20140926102843 CreateParaComponents: migrating =============================
-- execute("CREATE EXTENSION IF NOT EXISTS hstore")
PG::InsufficientPrivilege: ERROR:  permission denied to create extension "hstore"
HINT:  Must be superuser to create this extension.
: CREATE EXTENSION IF NOT EXISTS hstore
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::InsufficientPrivilege: ERROR:  permission denied to create extension "hstore"
HINT:  Must be superuser to create this extension.

Any idea on why I can't create that extension ?

Plugins' containers removal/redeployment

Now we can configure plugins' images through dokkurc, but how can we actually deploy a new image, if there is one already running?

Per dokku-alt/postgresql-dockerfiles#1 (comment) and #33 (comment), I would like to consider a separate command and / or plugins' modification, that'd allow more straightforward way to redeploy plugins.

There could be a generic command to work with standard plugins (like mariadb, postgresql and redis) to remove running plugin container.
Alternatively each plugin could have an additional reset command to destroy an existing image. There could also be something like upgrade if I want to deploy a new image without losing my data, though I am afraid a full automation would be too fragile.

User creation

Just a suggestion...
I think it would be nice as someone managing the system if there were an api similar to:

dokku sshkeys:set <keyname> <keystring>
dokku sshkeys:get <keyname>
dokku sshkeys:unset <keyname>

and sshcommand or access:add would be taken care of for me by those commands.

Apps not working after reboot

When the server / docker is rebooted, apps are not working anymore. While in a datacenter this should be pretty rare, power failures might happen. I manually type dokku rebuild:all to put apps up again.

There must be an Upstart script that either start containers again or issue dokku rebuild:all on boot.

Restart issues

I restarted my server and my apps didn't restart.

I took a look at /etc/init/dokku-redeploy.conf

description "Dokku app redeploy service"

start on (started docker)

script
  sleep 2 # give docker some time
  sudo -i -u dokku /usr/local/bin/dokku deploy:all
end script

And then grabbed the command sudo -i -u dokku /usr/local/bin/dokku deploy:all and ran it manually.
I received this error:

-sh: 3: /etc/profile.d/resize.sh: [[: not found
Access denied. No user supplied.

So I ran: dokku deploy:all and got everything running again ok.

Changing my /etc/init/dokku-redeploy.conf file to just run /usr/local/bin/dokku deploy:all and restarting now works.

  • Could this be permissions related?
  • Will I run into issues in future by running /usr/local/bin/dokku deploy:all instead of sudo -i -u dokku /usr/local/bin/dokku deploy:all?

Invalid app name

I'm trying to create a root app for my domain mydomain.com. In Dokku, I would do this using (on my local machine):

git remote add dokku [email protected]:mydomain.com
git push remote master

This would create the app mydomain.com in Dokku, but I instead get this message:

Invalid app name
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

How would I create a root domain when I can't specify a domain as the app name?

Restarting docker breaks apps

service docker restart

This does not start the apps back. I have seen an up-start service to deploy all apps after a restart, but it seems that it didn't work properly.

Also after starting the apps, they does not seem to work like they did before, I'm investigating the cause.

Cannot set environment variable with whitespace

This was already reported in #4 but not actually solved despite the fact, that whitespace in environment variables have a legitimate use cases.

I cannot set environment variable with spaces using config:set, e.g.:

dokku config:set myapp SYNC_SCHEDULE='0 */12 * * *'
dokku config:set myapp 'SYNC_SCHEDULE="0 */12 * * *"'

Always fails with Must specify KEY and VALUE to set.

Dokku fails to respond to HTTP requests (instead of redirecting to HTTPS)

I've added a ssl/ folder to /home/dokku/app/ with my server keys, and now I can access https://website.com/ just fine.

The problem is, when I attempt to load http://website.com, there's a very long wait .. followed by a timeout. Shouldn't it be redirecting to https://website.com?

Here's the nginx.conf file in home/dokku/app/:

upstream app { server 127.0.0.1:49158; }
server {
  listen      [::]:80;
  listen      *:80;
  server_name website.com api.website.com dashboard.website.com;
  return 302 https://website.com$request_uri;
}
server {
  listen      [::]:443 ssl spdy;
  listen      *:443 ssl spdy;
  server_name website.com api.website.com dashboard.website.com;

  keepalive_timeout   70;
  add_header Alternate-Protocol 443:npn-spdy/2;

  ssl on;
  ssl_certificate     /home/dokku/app/ssl/server.crt;
  ssl_certificate_key /home/dokku/app/ssl/server.key;
  ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128:AES256:AES:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK;
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  ssl_prefer_server_ciphers on;
  ssl_session_timeout 5m;
  ssl_session_cache shared:SSL:50m;

  location    / {
    proxy_pass  http://app;
proxy_redirect http://website.com:5000/ https://website.com/;
proxy_redirect https://website.com:5000/ https://website.com/;
proxy_redirect http://api.website.com:5000/ https://api.website.com/;
proxy_redirect https://api.website.com:5000/ https://api.website.com/;
proxy_redirect http://dashboard.website.com:5000/ https://dashboard.website.com/;
proxy_redirect https://dashboard.website.com:5000/ https://dashboard.website.com/;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-Port $server_port;
    proxy_set_header X-Request-Start $msec;
  }
}

ruby buildpack has too short timeouts for some corporate environments

remote: -----> Compiling Ruby/Rails
remote: !
remote: ! Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/cedar/ruby-2.1.1.tgz -s -o - | tar zxf - ' failed unexpectedly:
remote: !
remote: ! gzip: stdin: invalid compressed data--format violated
remote: ! tar: Skipping to next header
remote: ! tar: Child died with signal 13
remote: ! tar: Error is not recoverable: exiting now
remote: !

My guess is that it is because of my low bandwidth, and 30 seconds-only timeout in curl command.

Can you tell, what files should I change to make dokku-alt use my own ruby-buildpack if I find a place to change timeouts? :)
(I suppose they are in ruby-buildpack)

Cannot import database contents, possibly terminal issues

I have been trying to run

dokku mariadb:console app app < app.sql

and it seems that some input is lost making import partial and inconstant:

root@cassi:~# dokku mariadb:console psc psc < psc.sql 
-- MySQL dump 10.14  Distrib 5.5.31-MariaDB, for Linux (x86_64)
--
-- Host: localhost    Database: app
-- ------------------------------------------------------
-- Server version   5.5.31-MariaDB-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `admin_groups`
--

DROP TABLE IF EXISTS `admin_groups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admin_groups` (
{snip}
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `admin_groups`
--

 {snip}
 INSERT INTO `admin_grops` VALUES (3,'f603bb6a5e6c2fe{snip..........snip}:20','217..9.250','');
/*!40000 ALTER Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 11
Server version: 5.5.37-MariaDB-1~quantal-log mariadb.org binary distribution

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [psc]> -- MySQL dump 10.14  Distrib 5.5.31-MariaDB, for Linux (x86_64)
ture for table `banners`
MariaDB [psc]> ure for table `banners`
--
    -> --

    -> 
DROP TABLE IF EXISTS `banners`;
    -> DROP TABLE IF EXISTS `banners`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ure for table `banners`

I have been able to work-around this by connecting to mysql directly:

root@cassi:~# mysql -u root -p -h 172.17.42.1 -P 49155 app < app.sql 

bootstrap.sh fails, Package not found

https://dokku-alt.github.io/dokku-alt (the apt-get source added by bootstrap.sh) redirects to GitHub's rendering of the project's Readme.md, which results in apt-get not being able to locate the dokku-alt package.

I've never dealt with GitHub's page generation, so unfortunately I can't provide a pull request to fix this at the moment.

Dockerfile deployment of images created with buildstep

Hi,

I came across Dokku-alt and one of the features which I spotted immediately was deployment of Dockerfiles.

Tried out the Nginx test Dockerfile in your distro and that works great.

However when I tried to do the same for a Dockerfile referring to an image which I had built with progrium/buildstep on my machine earlier, the process fails silently. When logging onto the machine and executing a docker ps, there is no sign of any running containers.

The reason why I would like to do this rather than using a git push, is to avoid any differences across environments when moving from an Acceptance into Production environment.

Deploying a Dockerfile which refers to an image like
FROM kristofsajdak/my-amazing-app:1.2.4
should make that work

Any thoughts here, is this a use case you envisioned as well ?

Regards

Kristof

Pass ENV variables for build step

Is there a way to pass ENV variables prior to the build step? Using config:set only applies after the build step. Buildpack allows setting curl parameters based on ENV variables (e.g. CURL_TIMEOUT, CURL_CONNECT_TIMEOUT). There are dokku plugins which allow seeing the ENV variables for the buildstep, but they are not compatible with dokku-alt. What is the best way to handle this scenario using dokku-alt?

! [remote rejected] master -> master (pre-receive hook declined)

I cannot deploy a rails app successfully due to this error. I've attached a trace of dokku - any ideas?

git push dokku master
++ [[ -z /home/dokku ]]
++++ dirname /var/lib/dokku-alt/plugins/00_dokku-standard/commands
+++ cd /var/lib/dokku-alt/plugins/00_dokku-standard
+++ pwd
++ CWD=/var/lib/dokku-alt/plugins/00_dokku-standard
+ case "$1" in
+++ [[ -z /home/dokku ]]
+++++ dirname /var/lib/dokku-alt/plugins/01_dokku-preboot/commands
++++ cd /var/lib/dokku-alt/plugins/01_dokku-preboot
++++ pwd
+++ CWD=/var/lib/dokku-alt/plugins/01_dokku-preboot
++ PREBOOT_STATUS=PREBOOT
+ case "$1" in
+ CURRENT_BACKUP_VERSION=1
+ set -e
+ case "$1" in
+ [[ git-receive-pack == config ]]
+ [[ git-receive-pack == config:* ]]
+ case "$1" in
+++ [[ -z /home/dokku ]]
+++++ dirname /var/lib/dokku-alt/plugins/data-volumes/commands
++++ cd /var/lib/dokku-alt/plugins/data-volumes
++++ pwd
+++ CWD=/var/lib/dokku-alt/plugins/data-volumes
++ VOLUME_ROOT=/home/dokku/.volumes
++ VOLUME_IMAGE=busybox:latest
++ VOLUME_CONTAINER_PREFIX=volume_data_
+ case "$1" in
+++ [[ -z /home/dokku ]]
+++++ dirname /var/lib/dokku-alt/plugins/dokku-mariadb/commands
++++ cd /var/lib/dokku-alt/plugins/dokku-mariadb
++++ pwd
+++ CWD=/var/lib/dokku-alt/plugins/dokku-mariadb
++ DB_ROOT=/home/dokku/.mariadb
++ DB_IMAGE=ayufan/dokku-alt-mariadb
++ DB_VOLUME=/home/dokku/.mariadb/mysql
++ DB_ADMIN_PASSWORD=/home/dokku/.mariadb/mysql_password
++ DB_CONTAINER=mariadb_single_container
++ DB_CONTAINER_LINK=mariadb
++ DB_CONTAINER_VOLUME=/opt/mysql
++ DB_CONTAINER_PASSWORD=/opt/mysql_password
++ DB_PORT=3306
++ DB_HOST=mariadb
++ DB_APP_PASSWORDS=/home/dokku/.mariadb/pwd_app_
++ DB_APP_DATABASES=/home/dokku/.mariadb/dbs_app_
+ case "$1" in
+++ [[ -z /home/dokku ]]
+++++ dirname /var/lib/dokku-alt/plugins/dokku-mongodb/commands
++++ cd /var/lib/dokku-alt/plugins/dokku-mongodb
++++ pwd
+++ CWD=/var/lib/dokku-alt/plugins/dokku-mongodb
++ DB_ROOT=/home/dokku/.mongodb
++ DB_IMAGE=ayufan/dokku-alt-mongodb
++ DB_VOLUME=/home/dokku/.mongodb/mongodb
++ DB_ADMIN_PASSWORD=/home/dokku/.mongodb/mongodb_password
++ DB_CONTAINER=mongodb_single_container
++ DB_CONTAINER_LINK=mongodb
++ DB_CONTAINER_VOLUME=/opt/mongodb
++ DB_CONTAINER_PASSWORD=/opt/mongodb_password
++ DB_PORT=27017
++ DB_HOST=mongodb
++ DB_APP_PASSWORDS=/home/dokku/.mongodb/pwd_app_
++ DB_APP_DATABASES=/home/dokku/.mongodb/dbs_app_
+ case "$1" in
+++ [[ -z /home/dokku ]]
+++++ dirname /var/lib/dokku-alt/plugins/dokku-postgresql/commands
++++ cd /var/lib/dokku-alt/plugins/dokku-postgresql
++++ pwd
+++ CWD=/var/lib/dokku-alt/plugins/dokku-postgresql
++ DB_ROOT=/home/dokku/.pgsql
++ DB_IMAGE=ayufan/dokku-alt-postgresql
++ DB_VOLUME=/home/dokku/.pgsql/postgresql
++ DB_ADMIN_PASSWORD=/home/dokku/.pgsql/postgresql_password
++ DB_CONTAINER=postgresql_single_container
++ DB_CONTAINER_LINK=postgresql
++ DB_CONTAINER_VOLUME=/opt/postgresql
++ DB_CONTAINER_PASSWORD=/opt/postgresql_password
++ DB_PORT=5432
++ DB_HOST=postgresql
++ DB_APP_PASSWORDS=/home/dokku/.pgsql/pwd_app_
++ DB_APP_DATABASES=/home/dokku/.pgsql/dbs_app_
+ case "$1" in
++ [[ -z /home/dokku ]]
++++ dirname /var/lib/dokku-alt/plugins/dokku-ps/commands
+++ cd /var/lib/dokku-alt/plugins/dokku-ps
+++ pwd
++ CWD=/var/lib/dokku-alt/plugins/dokku-ps
+ case "$1" in
++ [[ -z /home/dokku ]]
++++ dirname /var/lib/dokku-alt/plugins/dokku-rebuild/commands
+++ cd /var/lib/dokku-alt/plugins/dokku-rebuild
+++ pwd
++ CWD=/var/lib/dokku-alt/plugins/dokku-rebuild
+ case "$1" in
+++ [[ -z /home/dokku ]]
+++++ dirname /var/lib/dokku-alt/plugins/dokku-redis/commands
++++ cd /var/lib/dokku-alt/plugins/dokku-redis
++++ pwd
+++ CWD=/var/lib/dokku-alt/plugins/dokku-redis
++ DB_ROOT=/home/dokku/.redis
++ DB_IMAGE=ayufan/dokku-alt-redis
++ DB_CONTAINER_LINK=redis
++ DB_CONTAINER_VOLUME=/var/lib/redis
++ DB_PORT=6379
+ case "$1" in
++ [[ -z /home/dokku ]]
++++ dirname /var/lib/dokku-alt/plugins/dokku-tag/commands
+++ cd /var/lib/dokku-alt/plugins/dokku-tag
+++ pwd
++ CWD=/var/lib/dokku-alt/plugins/dokku-tag
+ case "$1" in
++ [[ -z /home/dokku ]]
++++ dirname /var/lib/dokku-alt/plugins/git/commands
+++ cd /var/lib/dokku-alt/plugins/git
+++ pwd
++ CWD=/var/lib/dokku-alt/plugins/git
+ case "$1" in
++ echo ''\''simcon'\'''
++ perl -pe 's/(?<!\\)'\''//g'
++ sed 's/\\'\''/'\''/g'
+ APP=simcon
+ check_app_name simcon
+ sanitize_name simcon 'app name'
+ local NAME=simcon
+ [[ simcon == '' ]]
+ local NAME2=simcon
+ [[ simcon != \s\i\m\c\o\n ]]
+ return 0
+ APP=simcon
+ IMAGE_GENERIC=dokku/simcon
+ [[ '' != '' ]]
++ basename /var/lib/dokku-alt/plugins/git/commands
+ local CMD_TYPE=commands
+ case "$CMD_TYPE" in
+ IMAGE=dokku/simcon:latest
+ APP_DIR=/home/dokku/simcon
+ APP_NAME_FILE=/home/dokku/simcon/CONTAINER
+ APP_NAME=
+ [[ -f /home/dokku/simcon/CONTAINER ]]
+ APP_CID_DIR=/home/dokku/simcon/CONTAINERS
+ APP_CACHE_NAME=cache_data_simcon
+ APP_PERSISTENT_NAMES=cache_data_simcon
+ return 0
+ [[ git-receive-pack == \g\i\t\-\r\e\c\e\i\v\e\-\p\a\c\k ]]
+ [[ ! -d /home/dokku/simcon/refs ]]
+ verify_app_name simcon
+ check_app_name simcon
+ sanitize_name simcon 'app name'
+ local NAME=simcon
+ [[ simcon == '' ]]
+ local NAME2=simcon
+ [[ simcon != \s\i\m\c\o\n ]]
+ return 0
+ APP=simcon
+ IMAGE_GENERIC=dokku/simcon
+ [[ '' != '' ]]
++ basename /var/lib/dokku-alt/plugins/git/commands
+ local CMD_TYPE=commands
+ case "$CMD_TYPE" in
+ IMAGE=dokku/simcon:latest
+ APP_DIR=/home/dokku/simcon
+ APP_NAME_FILE=/home/dokku/simcon/CONTAINER
+ APP_NAME=
+ [[ -f /home/dokku/simcon/CONTAINER ]]
+ APP_CID_DIR=/home/dokku/simcon/CONTAINERS
+ APP_CACHE_NAME=cache_data_simcon
+ APP_PERSISTENT_NAMES=cache_data_simcon
+ return 0
+ [[ ! -d /home/dokku/simcon ]]
+ return 0
+ args='git-receive-pack '\''simcon'\'''
+ git-shell -c 'git-receive-pack '\''simcon'\'''
Counting objects: 4183, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1318/1318), done.
Writing objects: 100% (4183/4183), 2.11 MiB | 1.09 MiB/s, done.
Total 4183 (delta 2736), reused 4145 (delta 2701)
remote: ++ [[ -z /home/dokku ]]
remote: ++++ dirname /usr/local/bin/dokku
remote: +++ cd /usr/local/bin
remote: +++ pwd
remote: ++ CWD=/usr/local/bin
remote: + [[ -f /home/dokku/dokkurc ]]
remote: + source /home/dokku/dokkurc
remote: ++ export DOKKU_TRACE=1
remote: ++ DOKKU_TRACE=1
remote: + [[ git-hook == '' ]]
remote: + case "$1" in
remote: ++ ls -d /var/lib/dokku-alt/plugins/00_dokku-standard/commands /var/lib/dokku-alt/plugins/01_dokku-preboot/commands /var/lib/dokku-alt/plugins/backup/commands /var/lib/dokku-alt/plugins/config/commands /var/lib/dokku-alt/plugins/data-volumes/commands /var/lib/dokku-alt/plugins/dokku-mariadb/commands /var/lib/dokku-alt/plugins/dokku-mongodb/commands /var/lib/dokku-alt/plugins/dokku-postgresql/commands /var/lib/dokku-alt/plugins/dokku-ps/commands /var/lib/dokku-alt/plugins/dokku-rebuild/commands /var/lib/dokku-alt/plugins/dokku-redis/commands /var/lib/dokku-alt/plugins/dokku-tag/commands /var/lib/dokku-alt/plugins/git/commands /var/lib/dokku-alt/plugins/nginx-vhosts/commands
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/00_dokku-standard/commands git-hook simcon
remote: ++ [[ -z /home/dokku ]]
remote: ++++ dirname /var/lib/dokku-alt/plugins/00_dokku-standard/commands
remote: +++ cd /var/lib/dokku-alt/plugins/00_dokku-standard
remote: +++ pwd
remote: ++ CWD=/var/lib/dokku-alt/plugins/00_dokku-standard
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/01_dokku-preboot/commands git-hook simcon
remote: +++ [[ -z /home/dokku ]]
remote: +++++ dirname /var/lib/dokku-alt/plugins/01_dokku-preboot/commands
remote: ++++ cd /var/lib/dokku-alt/plugins/01_dokku-preboot
remote: ++++ pwd
remote: +++ CWD=/var/lib/dokku-alt/plugins/01_dokku-preboot
remote: ++ PREBOOT_STATUS=PREBOOT
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/backup/commands git-hook simcon
remote: + CURRENT_BACKUP_VERSION=1
remote: + set -e
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/config/commands git-hook simcon
remote: + [[ git-hook == config ]]
remote: + [[ git-hook == config:* ]]
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/data-volumes/commands git-hook simcon
remote: +++ [[ -z /home/dokku ]]
remote: +++++ dirname /var/lib/dokku-alt/plugins/data-volumes/commands
remote: ++++ cd /var/lib/dokku-alt/plugins/data-volumes
remote: ++++ pwd
remote: +++ CWD=/var/lib/dokku-alt/plugins/data-volumes
remote: ++ VOLUME_ROOT=/home/dokku/.volumes
remote: ++ VOLUME_IMAGE=busybox:latest
remote: ++ VOLUME_CONTAINER_PREFIX=volume_data_
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/dokku-mariadb/commands git-hook simcon
remote: +++ [[ -z /home/dokku ]]
remote: +++++ dirname /var/lib/dokku-alt/plugins/dokku-mariadb/commands
remote: ++++ cd /var/lib/dokku-alt/plugins/dokku-mariadb
remote: ++++ pwd
remote: +++ CWD=/var/lib/dokku-alt/plugins/dokku-mariadb
remote: ++ DB_ROOT=/home/dokku/.mariadb
remote: ++ DB_IMAGE=ayufan/dokku-alt-mariadb
remote: ++ DB_VOLUME=/home/dokku/.mariadb/mysql
remote: ++ DB_ADMIN_PASSWORD=/home/dokku/.mariadb/mysql_password
remote: ++ DB_CONTAINER=mariadb_single_container
remote: ++ DB_CONTAINER_LINK=mariadb
remote: ++ DB_CONTAINER_VOLUME=/opt/mysql
remote: ++ DB_CONTAINER_PASSWORD=/opt/mysql_password
remote: ++ DB_PORT=3306
remote: ++ DB_HOST=mariadb
remote: ++ DB_APP_PASSWORDS=/home/dokku/.mariadb/pwd_app_
remote: ++ DB_APP_DATABASES=/home/dokku/.mariadb/dbs_app_
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/dokku-mongodb/commands git-hook simcon
remote: +++ [[ -z /home/dokku ]]
remote: +++++ dirname /var/lib/dokku-alt/plugins/dokku-mongodb/commands
remote: ++++ cd /var/lib/dokku-alt/plugins/dokku-mongodb
remote: ++++ pwd
remote: +++ CWD=/var/lib/dokku-alt/plugins/dokku-mongodb
remote: ++ DB_ROOT=/home/dokku/.mongodb
remote: ++ DB_IMAGE=ayufan/dokku-alt-mongodb
remote: ++ DB_VOLUME=/home/dokku/.mongodb/mongodb
remote: ++ DB_ADMIN_PASSWORD=/home/dokku/.mongodb/mongodb_password
remote: ++ DB_CONTAINER=mongodb_single_container
remote: ++ DB_CONTAINER_LINK=mongodb
remote: ++ DB_CONTAINER_VOLUME=/opt/mongodb
remote: ++ DB_CONTAINER_PASSWORD=/opt/mongodb_password
remote: ++ DB_PORT=27017
remote: ++ DB_HOST=mongodb
remote: ++ DB_APP_PASSWORDS=/home/dokku/.mongodb/pwd_app_
remote: ++ DB_APP_DATABASES=/home/dokku/.mongodb/dbs_app_
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/dokku-postgresql/commands git-hook simcon
remote: +++ [[ -z /home/dokku ]]
remote: +++++ dirname /var/lib/dokku-alt/plugins/dokku-postgresql/commands
remote: ++++ cd /var/lib/dokku-alt/plugins/dokku-postgresql
remote: ++++ pwd
remote: +++ CWD=/var/lib/dokku-alt/plugins/dokku-postgresql
remote: ++ DB_ROOT=/home/dokku/.pgsql
remote: ++ DB_IMAGE=ayufan/dokku-alt-postgresql
remote: ++ DB_VOLUME=/home/dokku/.pgsql/postgresql
remote: ++ DB_ADMIN_PASSWORD=/home/dokku/.pgsql/postgresql_password
remote: ++ DB_CONTAINER=postgresql_single_container
remote: ++ DB_CONTAINER_LINK=postgresql
remote: ++ DB_CONTAINER_VOLUME=/opt/postgresql
remote: ++ DB_CONTAINER_PASSWORD=/opt/postgresql_password
remote: ++ DB_PORT=5432
remote: ++ DB_HOST=postgresql
remote: ++ DB_APP_PASSWORDS=/home/dokku/.pgsql/pwd_app_
remote: ++ DB_APP_DATABASES=/home/dokku/.pgsql/dbs_app_
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/dokku-ps/commands git-hook simcon
remote: ++ [[ -z /home/dokku ]]
remote: ++++ dirname /var/lib/dokku-alt/plugins/dokku-ps/commands
remote: +++ cd /var/lib/dokku-alt/plugins/dokku-ps
remote: +++ pwd
remote: ++ CWD=/var/lib/dokku-alt/plugins/dokku-ps
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/dokku-rebuild/commands git-hook simcon
remote: ++ [[ -z /home/dokku ]]
remote: ++++ dirname /var/lib/dokku-alt/plugins/dokku-rebuild/commands
remote: +++ cd /var/lib/dokku-alt/plugins/dokku-rebuild
remote: +++ pwd
remote: ++ CWD=/var/lib/dokku-alt/plugins/dokku-rebuild
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/dokku-redis/commands git-hook simcon
remote: +++ [[ -z /home/dokku ]]
remote: +++++ dirname /var/lib/dokku-alt/plugins/dokku-redis/commands
remote: ++++ cd /var/lib/dokku-alt/plugins/dokku-redis
remote: ++++ pwd
remote: +++ CWD=/var/lib/dokku-alt/plugins/dokku-redis
remote: ++ DB_ROOT=/home/dokku/.redis
remote: ++ DB_IMAGE=ayufan/dokku-alt-redis
remote: ++ DB_CONTAINER_LINK=redis
remote: ++ DB_CONTAINER_VOLUME=/var/lib/redis
remote: ++ DB_PORT=6379
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/dokku-tag/commands git-hook simcon
remote: ++ [[ -z /home/dokku ]]
remote: ++++ dirname /var/lib/dokku-alt/plugins/dokku-tag/commands
remote: +++ cd /var/lib/dokku-alt/plugins/dokku-tag
remote: +++ pwd
remote: ++ CWD=/var/lib/dokku-alt/plugins/dokku-tag
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/git/commands git-hook simcon
remote: ++ [[ -z /home/dokku ]]
remote: ++++ dirname /var/lib/dokku-alt/plugins/git/commands
remote: +++ cd /var/lib/dokku-alt/plugins/git
remote: +++ pwd
remote: ++ CWD=/var/lib/dokku-alt/plugins/git
remote: + case "$1" in
remote: + verify_app_name simcon
remote: + check_app_name simcon
remote: + sanitize_name simcon 'app name'
remote: + local NAME=simcon
remote: + [[ simcon == '' ]]
remote: + local NAME2=simcon
remote: + [[ simcon != \s\i\m\c\o\n ]]
remote: + return 0
remote: + APP=simcon
remote: + IMAGE_GENERIC=dokku/simcon
remote: + [[ '' != '' ]]
remote: ++ basename /var/lib/dokku-alt/plugins/git/commands
remote: + local CMD_TYPE=commands
remote: + case "$CMD_TYPE" in
remote: + IMAGE=dokku/simcon:latest
remote: + APP_DIR=/home/dokku/simcon
remote: + APP_NAME_FILE=/home/dokku/simcon/CONTAINER
remote: + APP_NAME=
remote: + [[ -f /home/dokku/simcon/CONTAINER ]]
remote: + APP_CID_DIR=/home/dokku/simcon/CONTAINERS
remote: + APP_CACHE_NAME=cache_data_simcon
remote: + APP_PERSISTENT_NAMES=cache_data_simcon
remote: + return 0
remote: + [[ ! -d /home/dokku/simcon ]]
remote: + return 0
remote: + read oldrev newrev refname
remote: + [[ refs/heads/master = \r\e\f\s\/\h\e\a\d\s\/\m\a\s\t\e\r ]]
remote: + dokku rebuild simcon 0ec2d7c5cac02b0c836710ff0d137095cbc95cf4
remote: ++ [[ -z /home/dokku ]]
remote: ++++ dirname /usr/local/bin/dokku
remote: +++ cd /usr/local/bin
remote: +++ pwd
remote: ++ CWD=/usr/local/bin
remote: + [[ -f /home/dokku/dokkurc ]]
remote: + source /home/dokku/dokkurc
remote: ++ export DOKKU_TRACE=1
remote: ++ DOKKU_TRACE=1
remote: + [[ rebuild == '' ]]
remote: + case "$1" in
remote: ++ ls -d /var/lib/dokku-alt/plugins/00_dokku-standard/commands /var/lib/dokku-alt/plugins/01_dokku-preboot/commands /var/lib/dokku-alt/plugins/backup/commands /var/lib/dokku-alt/plugins/config/commands /var/lib/dokku-alt/plugins/data-volumes/commands /var/lib/dokku-alt/plugins/dokku-mariadb/commands /var/lib/dokku-alt/plugins/dokku-mongodb/commands /var/lib/dokku-alt/plugins/dokku-postgresql/commands /var/lib/dokku-alt/plugins/dokku-ps/commands /var/lib/dokku-alt/plugins/dokku-rebuild/commands /var/lib/dokku-alt/plugins/dokku-redis/commands /var/lib/dokku-alt/plugins/dokku-tag/commands /var/lib/dokku-alt/plugins/git/commands /var/lib/dokku-alt/plugins/nginx-vhosts/commands
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/00_dokku-standard/commands rebuild simcon 0ec2d7c5cac02b0c836710ff0d137095cbc95cf4
remote: ++ [[ -z /home/dokku ]]
remote: ++++ dirname /var/lib/dokku-alt/plugins/00_dokku-standard/commands
remote: +++ cd /var/lib/dokku-alt/plugins/00_dokku-standard
remote: +++ pwd
remote: ++ CWD=/var/lib/dokku-alt/plugins/00_dokku-standard
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/01_dokku-preboot/commands rebuild simcon 0ec2d7c5cac02b0c836710ff0d137095cbc95cf4
remote: +++ [[ -z /home/dokku ]]
remote: +++++ dirname /var/lib/dokku-alt/plugins/01_dokku-preboot/commands
remote: ++++ cd /var/lib/dokku-alt/plugins/01_dokku-preboot
remote: ++++ pwd
remote: +++ CWD=/var/lib/dokku-alt/plugins/01_dokku-preboot
remote: ++ PREBOOT_STATUS=PREBOOT
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/backup/commands rebuild simcon 0ec2d7c5cac02b0c836710ff0d137095cbc95cf4
remote: + CURRENT_BACKUP_VERSION=1
remote: + set -e
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/config/commands rebuild simcon 0ec2d7c5cac02b0c836710ff0d137095cbc95cf4
remote: + [[ rebuild == config ]]
remote: + [[ rebuild == config:* ]]
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/data-volumes/commands rebuild simcon 0ec2d7c5cac02b0c836710ff0d137095cbc95cf4
remote: +++ [[ -z /home/dokku ]]
remote: +++++ dirname /var/lib/dokku-alt/plugins/data-volumes/commands
remote: ++++ cd /var/lib/dokku-alt/plugins/data-volumes
remote: ++++ pwd
remote: +++ CWD=/var/lib/dokku-alt/plugins/data-volumes
remote: ++ VOLUME_ROOT=/home/dokku/.volumes
remote: ++ VOLUME_IMAGE=busybox:latest
remote: ++ VOLUME_CONTAINER_PREFIX=volume_data_
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/dokku-mariadb/commands rebuild simcon 0ec2d7c5cac02b0c836710ff0d137095cbc95cf4
remote: +++ [[ -z /home/dokku ]]
remote: +++++ dirname /var/lib/dokku-alt/plugins/dokku-mariadb/commands
remote: ++++ cd /var/lib/dokku-alt/plugins/dokku-mariadb
remote: ++++ pwd
remote: +++ CWD=/var/lib/dokku-alt/plugins/dokku-mariadb
remote: ++ DB_ROOT=/home/dokku/.mariadb
remote: ++ DB_IMAGE=ayufan/dokku-alt-mariadb
remote: ++ DB_VOLUME=/home/dokku/.mariadb/mysql
remote: ++ DB_ADMIN_PASSWORD=/home/dokku/.mariadb/mysql_password
remote: ++ DB_CONTAINER=mariadb_single_container
remote: ++ DB_CONTAINER_LINK=mariadb
remote: ++ DB_CONTAINER_VOLUME=/opt/mysql
remote: ++ DB_CONTAINER_PASSWORD=/opt/mysql_password
remote: ++ DB_PORT=3306
remote: ++ DB_HOST=mariadb
remote: ++ DB_APP_PASSWORDS=/home/dokku/.mariadb/pwd_app_
remote: ++ DB_APP_DATABASES=/home/dokku/.mariadb/dbs_app_
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/dokku-mongodb/commands rebuild simcon 0ec2d7c5cac02b0c836710ff0d137095cbc95cf4
remote: +++ [[ -z /home/dokku ]]
remote: +++++ dirname /var/lib/dokku-alt/plugins/dokku-mongodb/commands
remote: ++++ cd /var/lib/dokku-alt/plugins/dokku-mongodb
remote: ++++ pwd
remote: +++ CWD=/var/lib/dokku-alt/plugins/dokku-mongodb
remote: ++ DB_ROOT=/home/dokku/.mongodb
remote: ++ DB_IMAGE=ayufan/dokku-alt-mongodb
remote: ++ DB_VOLUME=/home/dokku/.mongodb/mongodb
remote: ++ DB_ADMIN_PASSWORD=/home/dokku/.mongodb/mongodb_password
remote: ++ DB_CONTAINER=mongodb_single_container
remote: ++ DB_CONTAINER_LINK=mongodb
remote: ++ DB_CONTAINER_VOLUME=/opt/mongodb
remote: ++ DB_CONTAINER_PASSWORD=/opt/mongodb_password
remote: ++ DB_PORT=27017
remote: ++ DB_HOST=mongodb
remote: ++ DB_APP_PASSWORDS=/home/dokku/.mongodb/pwd_app_
remote: ++ DB_APP_DATABASES=/home/dokku/.mongodb/dbs_app_
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/dokku-postgresql/commands rebuild simcon 0ec2d7c5cac02b0c836710ff0d137095cbc95cf4
remote: +++ [[ -z /home/dokku ]]
remote: +++++ dirname /var/lib/dokku-alt/plugins/dokku-postgresql/commands
remote: ++++ cd /var/lib/dokku-alt/plugins/dokku-postgresql
remote: ++++ pwd
remote: +++ CWD=/var/lib/dokku-alt/plugins/dokku-postgresql
remote: ++ DB_ROOT=/home/dokku/.pgsql
remote: ++ DB_IMAGE=ayufan/dokku-alt-postgresql
remote: ++ DB_VOLUME=/home/dokku/.pgsql/postgresql
remote: ++ DB_ADMIN_PASSWORD=/home/dokku/.pgsql/postgresql_password
remote: ++ DB_CONTAINER=postgresql_single_container
remote: ++ DB_CONTAINER_LINK=postgresql
remote: ++ DB_CONTAINER_VOLUME=/opt/postgresql
remote: ++ DB_CONTAINER_PASSWORD=/opt/postgresql_password
remote: ++ DB_PORT=5432
remote: ++ DB_HOST=postgresql
remote: ++ DB_APP_PASSWORDS=/home/dokku/.pgsql/pwd_app_
remote: ++ DB_APP_DATABASES=/home/dokku/.pgsql/dbs_app_
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/dokku-ps/commands rebuild simcon 0ec2d7c5cac02b0c836710ff0d137095cbc95cf4
remote: ++ [[ -z /home/dokku ]]
remote: ++++ dirname /var/lib/dokku-alt/plugins/dokku-ps/commands
remote: +++ cd /var/lib/dokku-alt/plugins/dokku-ps
remote: +++ pwd
remote: ++ CWD=/var/lib/dokku-alt/plugins/dokku-ps
remote: + case "$1" in
remote: + for script in '$(ls -d $PLUGIN_PATH/*/commands 2>/dev/null)'
remote: + /var/lib/dokku-alt/plugins/dokku-rebuild/commands rebuild simcon 0ec2d7c5cac02b0c836710ff0d137095cbc95cf4
remote: ++ [[ -z /home/dokku ]]
remote: ++++ dirname /var/lib/dokku-alt/plugins/dokku-rebuild/commands
remote: +++ cd /var/lib/dokku-alt/plugins/dokku-rebuild
remote: +++ pwd
remote: ++ CWD=/var/lib/dokku-alt/plugins/dokku-rebuild
remote: + case "$1" in
remote: + verify_app_name simcon
remote: + check_app_name simcon
remote: + sanitize_name simcon 'app name'
remote: + local NAME=simcon
remote: + [[ simcon == '' ]]
remote: + local NAME2=simcon
remote: + [[ simcon != \s\i\m\c\o\n ]]
remote: + return 0
remote: + APP=simcon
remote: + IMAGE_GENERIC=dokku/simcon
remote: + [[ '' != '' ]]
remote: ++ basename /var/lib/dokku-alt/plugins/dokku-rebuild/commands
remote: + local CMD_TYPE=commands
remote: + case "$CMD_TYPE" in
remote: + IMAGE=dokku/simcon:latest
remote: + APP_DIR=/home/dokku/simcon
remote: + APP_NAME_FILE=/home/dokku/simcon/CONTAINER
remote: + APP_NAME=
remote: + [[ -f /home/dokku/simcon/CONTAINER ]]
remote: + APP_CID_DIR=/home/dokku/simcon/CONTAINERS
remote: + APP_CACHE_NAME=cache_data_simcon
remote: + APP_PERSISTENT_NAMES=cache_data_simcon
remote: + return 0
remote: + [[ ! -d /home/dokku/simcon ]]
remote: + return 0
remote: + verify_max_args 3 rebuild simcon 0ec2d7c5cac02b0c836710ff0d137095cbc95cf4
remote: + local MAX_ARGS=3
remote: + [[ 4 -le 4 ]]
remote: + [[ 3 -ge 3 ]]
remote: + REF=0ec2d7c5cac02b0c836710ff0d137095cbc95cf4
remote: + dokku_build_app_from_git simcon 0ec2d7c5cac02b0c836710ff0d137095cbc95cf4
/'
remote: + verify_app_name simcon
remote: + check_app_name simcon
remote: + sanitize_name simcon 'app name'
remote: + local NAME=simcon
remote: + [[ simcon == '' ]]
remote: + local NAME2=simcon
remote: + [[ simcon != \s\i\m\c\o\n ]]
remote: + return 0
remote: + APP=simcon
remote: + IMAGE_GENERIC=dokku/simcon
remote: + [[ '' != '' ]]
remote: ++ basename /var/lib/dokku-alt/plugins/dokku-rebuild/commands
remote: + local CMD_TYPE=commands
remote: + case "$CMD_TYPE" in
remote: + IMAGE=dokku/simcon:latest
remote: + APP_DIR=/home/dokku/simcon
remote: + APP_NAME_FILE=/home/dokku/simcon/CONTAINER
remote: + APP_NAME=
remote: + [[ -f /home/dokku/simcon/CONTAINER ]]
remote: + APP_CID_DIR=/home/dokku/simcon/CONTAINERS
remote: + APP_CACHE_NAME=cache_data_simcon
remote: + APP_PERSISTENT_NAMES=cache_data_simcon
remote: + return 0
remote: + [[ ! -d /home/dokku/simcon ]]
remote: + return 0
remote: + verify_max_args 2 simcon 0ec2d7c5cac02b0c836710ff0d137095cbc95cf4
remote: + local MAX_ARGS=2
remote: + [[ 3 -le 3 ]]
remote: + REV=0ec2d7c5cac02b0c836710ff0d137095cbc95cf4
remote: ++ mktemp -d
remote: + TMP_WORK_DIR=/tmp/tmp.RSwVstEUZ9
remote: + trap 'rm -rf "/tmp/tmp.RSwVstEUZ9"' RETURN
remote: + chmod 755 /tmp/tmp.RSwVstEUZ9
remote: + unset GIT_DIR GIT_WORK_TREE
remote: + pushd /tmp/tmp.RSwVstEUZ9
remote: + git clone /home/dokku/simcon /tmp/tmp.RSwVstEUZ9
remote: Cloning into '/tmp/tmp.RSwVstEUZ9'...
remote: warning: You appear to have cloned an empty repository.
remote: done.
remote: + git config advice.detachedHead false
remote: + git checkout 0ec2d7c5cac02b0c836710ff0d137095cbc95cf4
remote: HEAD is now at 0ec2d7c... updated puma port
remote: + git submodule update --init --recursive
remote: + [[ -f Dockerfile ]]
remote: + info 'Building simcon using buildstep...'
remote: + echo '-----> Building simcon using buildstep...'
remote: + find -name .git -prune -exec rm -rf '{}' ';'
-----> Building simcon using buildstep...
remote: + tar c .
remote: + docker run -i -a stdin ayufan/dokku-alt-buildstep:foreman /bin/bash -c 'mkdir -p /app && tar -xC /app'
remote: + commit_image dokku/simcon:build
remote: + read ID
remote: + wait_for_container 0c411098ec8a9df9fd878dd1823f1a0b860ab0fcb78e831aedb172a69322eaa4
remote: + for i in 1 2 3 4 5 6 7 8 9 0
remote: + docker inspect 0c411098ec8a9df9fd878dd1823f1a0b860ab0fcb78e831aedb172a69322eaa4
remote: + return 0
remote: ++ docker wait 0c411098ec8a9df9fd878dd1823f1a0b860ab0fcb78e831aedb172a69322eaa4
remote: + test 0 -eq 0
remote: + docker commit 0c411098ec8a9df9fd878dd1823f1a0b860ab0fcb78e831aedb172a69322eaa4 dokku/simcon:build
remote: + docker rm -f 0c411098ec8a9df9fd878dd1823f1a0b860ab0fcb78e831aedb172a69322eaa4
remote: + return 0
remote: + pluginhook pre-build simcon 0ec2d7c5cac02b0c836710ff0d137095cbc95cf4 buildstep
remote: + APP=simcon
remote: + IMAGE=dokku/simcon
remote: + SOURCE_ENV_PATH=/home/dokku/BUILD_ENV
remote: + [[ -f /home/dokku/BUILD_ENV ]]
remote: + echo '-----> Adding /home/dokku/BUILD_ENV to build environment ...'
remote: ++ cat /home/dokku/BUILD_ENV
remote: ++ docker run -i -a stdin dokku/simcon /bin/bash -c 'cat >> /app/.env'
remote: Unable to find image 'dokku/simcon' locally
remote: Pulling repository dokku/simcon
remote: 2014/08/13 16:35:24 HTTP code: 404
remote: + id=
+++ [[ -z /home/dokku ]]
+++++ dirname /var/lib/dokku-alt/plugins/nginx-vhosts/commands
++++ cd /var/lib/dokku-alt/plugins/nginx-vhosts
++++ pwd
+++ CWD=/var/lib/dokku-alt/plugins/nginx-vhosts
+ case "$1" in
To [email protected]:simcon
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:simcon'

volume:link results in undeployable app

Hi,

deployed rails application using buildpack. Created a volume and linked it:

$ dokku volume:create staging-volume /app/public/uploads
$ dokku volume:link staging staging-volume

Checked with volume:list and volume:list:apps staging, output looked good.

After that redeploy finishes with:

-----> Discovering process types
       Procfile declares types -> web
       Default process types for Ruby -> rake, console, web, worker
remote: rm: cannot remove `/app/public/uploads': Device or resource busy

Need a reasonable strategy to create application config before push

My desired workflow is the following:

  1. admin creates application record for user
  2. admin configures application for user (build pack)
  3. [in the future - admin associates user's public key with app]
    and then
  4. user commits and pushes app with regular "git remote add && push"

This does not seem possible right now:

  • If I attempt to set config before app is created, i get: "app <> does not exist"
  • If I push a "placeholder" app for the user to create it, further git push would require --force (i assume)

I'm trying to think about a reasonable strategy, please suggest.

(note: I need this for: https://github.com/romaninsh/dokku-alt-manager)

Repository ayufan/dokku-alt-buildstep already being pulled

I'm currently getting this when trying to push an app after a fresh install of dokku-alt...

remote: Repository ayufan/dokku-alt-buildstep already being pulled by another client. Waiting.

Ive tried clearing out docker images and such but can't get passed this. Ideas?

Cannot use Ruby 2.1.3

Hi,
I tried to use Ruby 2.1.3 but buildstep somehow fails.
Couldn't find a way to fix it.

Here's the output:

remote: HEAD is now at 9871bde... Using ruby 2.1.3
remote: -----> Building maggie using buildstep...
remote: -----> Installing ENV in build environment ...
remote:        Ruby app detected
remote: -----> Compiling Ruby/Rails
remote:  !
remote:  !     Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/ruby-2.1.3.tgz -s -o - | tar zxf - ' failed unexpectedly:
remote:  !
remote:  !     gzip: stdin: unexpected end of file
remote:  !     tar: Child returned status 1
remote:  !     tar: Error is not recoverable: exiting now
remote:  !

After finding someone's stackoverflow question, I get the idea that heroku is somehow restricting access to the 2.1.3 buildpack.
Is there a way to fix that? The url definitely returns an error.

How to use an alternate image for a plugin?

I would like to use a different Docker image with included plugin – for example for dokku-postgresql use a different image than ayufan/dokku-alt-postgresql (which has somewhat dated dependencies).

What is recommended way to handle this? Is there some way to override standard variables defined in vars file for a plugin, or do I have to change it manually on the server?

dokku rebuild <app> requires user to hit "enter"

Although this is an undocumented command for dokku, I have found it quite useful during testing.

There is something unusual about it, though. It requires me to press "enter" after the build process is completed. In particular the following command:

dokku@cassi:/tmp/tmp.Xolo7e7HIo$ docker run -i -a stdin --volumes-from=cache_data_psc --link mariadb_single_container:mariadb dokku/psc:build /build/builder

193d76060b56e8afd84f2fad9d16e09d9630431e4bc6440425101cd5e6c6bbb6

After it's being executed I must hit enter for the build process to resume. To reproduce:

dokku rebuild

Wait for output to stop, then hit enter.

My knowledge of docker is still limited, and I'm not sure if it's dokku or docker who causes this. The build seems to be OK from git push.

Stuck at "Could not find container for entity id ..."

I think that the previous push didn't create a running container..... not sure if related but i'm now stuck here. CONTAINER inside the app doesn't point to this missing id though. Thoughts?

Counting objects: 41, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (41/41), done.
Writing objects: 100% (41/41), 1.01 MiB | 0 bytes/s, done.
Total 41 (delta 28), reused 0 (delta 0)
remote: Cloning into '/tmp/tmp.es0qmqpSrj'...
remote: done.
remote: HEAD is now at 1182a33... 2.1
remote: -----> Building www using buildstep...
remote: Unable to find image 'ayufan/dokku-alt-buildstep:foreman' locally
remote: Pulling repository ayufan/dokku-alt-buildstep
remote:
remote:
remote: -----> Installing ENV in build environment ...
remote: 2014/10/10 00:43:57 Error response from daemon: Could not find container for entity id 60ba8d6cbcf4101f908c12c9e23b952a70721d62008b55a82a8a227d7cb8dd4a

heroku-buildpack-ruby/bundler-1.6.3.tgz - gzip: stdin: unexpected end of file

I'm really confused right now. Dokku-alt has been working well for me for about a week. I've been documenting the process of setting up our app with dokku, and done this step many times now..

However since about 12 hours ago this part of the deploy/build process has been failing and I can't get around it.

I've been googling around and similar errors were happening for people in May - they were due to connect-timeout being too small - this is not the same problem as that. This fails immediately and I'm unsure how to get more information about the problem. I would like to see what response curl is getting in this context. As root on the dokku host the command completes successfully.

This happens on a completely fresh install - just paste the dokku install line on fresh vps, push the app and it fails.

loomio ➤ git push loomio-sandbox dokku:master
...
remote: -----> Building loomio-sandbox using buildstep...
remote: Unable to find image 'ayufan/dokku-alt-buildstep:foreman' locally
remote: Pulling repository ayufan/dokku-alt-buildstep
remote: -----> Installing ENV in build environment ...
remote:        Ruby app detected
remote:  !
remote:  !     Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/bundler-1.6.3.tgz -s -o - | tar zxf - ' failed unexpectedly:
remote:  !     
remote:  !     gzip: stdin: unexpected end of file
remote:  !     tar: Child returned status 1
remote:  !     tar: Error is not recoverable: exiting now

Ports are open

Hi,
I noticed the containers I get through the plugins for redis and postgresql open their respective ports in 0.0.0.0:XXXX

Even though this ports are random, this should not happen.

Is it possible to link the redis container to my app container without opening the port?
I noticed the memcached plugin does it somehow.

root@maggie:~# docker ps
CONTAINER ID        IMAGE                                COMMAND                CREATED             STATUS              PORTS                     NAMES
92e8ab890d0d        dokku/maggie:latest                  /start                 8 minutes ago       Up 8 minutes        0.0.0.0:49210->5000/tcp   app_maggie_1406541752_17659
2d6d43be36e4        jlachowski/memcached:latest          /usr/bin/memcached -   9 days ago          Up 4 days           11211/tcp                 app_maggie_1406541752_17659/memcache,memcached_maggie
a9f8f87a0d64        ayufan/dokku-alt-redis:latest        /usr/bin/start_redis   9 days ago          Up 9 days           0.0.0.0:49170->6379/tcp   app_maggie_1406541752_17659/redis,redis_app_maggie
22d5be282ec6        ayufan/dokku-alt-postgresql:latest   /usr/bin/start_pgsql   9 days ago          Up 9 days           0.0.0.0:49154->5432/tcp   app_maggie_1406541752_17659/postgresql,postgresql_single_container

Non-admin user support.

As suggested in README, we would like to have certain keys with ability to only push apps and not execute dokku comments.

I think this can be best done by constructing authorized_keys file from chunks managed by dokku plugin. Here are the commands:

  • auth:add
  • auth:list
  • auth:del

The admin's keys can't be added or updated through dokku interface (for security). The rebuild of the file could be as simple as:

cat ~dokku/admin-auth/* ~dokku/auth/* > .ssh/authorized_keys

I'd like to hear feedback on this enhancement proposal.

Project home page and easy-deployer.

To help get the project rolling I was thinking that we need three things:

  • a nice and clean homepage explaining the project and it's benefits
  • a great way anyone can easily set up dokku-alt.
  • a visual manager for dokku-alt, so that users could stay away form command-line if they want

This does coincide with my other project where I plan to use dokku-alt (framework deploy to cloud technology), so I'd be willing to contribute to this as I would probably be able to efficiently re-use code.

My plan here would be:

  • @ayufan - create new repository for the web page
  • @romaninsh - Get the basic HTML page ready with a nice modern responsive markup
  • @ayufan Host the homepage inside Dokker-alt (but of course)
  • @ayufan Get web page set up on a domain (consider name change?)
  • @ayufan Add social buttons / presence
  • @romaninsh Add wizard with steps described below.
  • @romaninsh Bundle UI manager into distribution, integrate as end-point of installation
  • @ayufan, @romaninsh Work on getting stable version out.

Wizard steps would be:

  1. authorise dokker app,
  2. select instance parameters,
  3. instance is created and dokku-alt is installed.
  4. new container with UI manager launched on this instance.
  5. user is redirected to his new UI manager

Weird: Code updates not reflecting in deployed dokku app

This one's really weird. I had to lock the doors, and check behind my back .. while pushing to Dokku just to make sure that no one (alive or dead) was modifying my code in transit.

The story problem

I've been happily deploying my app using my beloved dokku-alt for the past week, often several times a day. Then today, something weird happens.

When I push updated code from my local Rails app, it doesn't get reflected on my production machine. And here's the weird part ..

  1. docker ps shows me that the container was in fact deployed with the new code (I can tell by the status: e.g. Up 30 seconds..)
  2. When I run dokku enter app, I can see the UPDATED CODE. What?
How can the production site be running the OLD code, when 
the docker container has the NEW code?

The changes I've made include adding new forms, new pages, and updating Javascript. None of it shows on the main machine (it's not a browser caching issue either; we're talking changes to server-side code)

Troubleshooting done so far:

  • Checked to see if the local hosts file has an entry pointing to the old server. No such entry exists.
  • Tried accessing the site from a VPN, and used someone else's laptop. Same thing. I get the old site.
  • Tried deleting the app from dokku and then pushing it again. Same thing. New code, old production page.
  • Tried deleting all the code in the dokku app (by running dokku enter app and then rm -Rf app/. The production site was still running! There's obviously another copy of the app running somewhere..
  • Tried running docker ps but I only get one entry for the currently deployed dokku container.

Recent changes made (may or may not be relevant):

  • Installed the sidekiq plugin. I've since removed it (by deleting the plugin folder, and running dokku rebuild app but the problem persists).
  • The dokku app is called app, with domain:set entries added for the actual and alias domain names.
  • Switched between dokku-alt and dokku-alt-beta, and then back to dokku-alt. Same problem.
  • Ran apt-get upgrade dokku-alt

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.