-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Thomas @ BeeDesk edited this page Feb 12, 2015
·
9 revisions
Welcome to the docker-dokku wiki!
====
On MacOS X
-
Download and Install Vagrant Option A (Vagrant)
- a. Create a new folder << vagrant folder >> (such as
ubuntu-docker
) cd << vagrant folder >>
vagrant init ubuntu/trusty64
vi VagrantFile
- Pick an IP address for Vagrant (such as 10.88.0.8)
- change line
config.vm.network "private_network", ip: "<< ip address >>"
vagrant up
Option B (EC2)
- Or, host of your choice
- a. Create a new folder << vagrant folder >> (such as
-
Install Docker and Dokku
vagrant ssh
sudo apt-get update
sudo apt-get install docker
- Install dokku: (needed to run it twice last time, maybe a transient problem)
- wget -qO- https://raw.github.com/progrium/dokku/v0.3.12/bootstrap.sh | sudo DOKKU_TAG=v0.3.12 bash
sudo apt-get install daemontools
sudo apt-get install build-essential
sudo apt-get install libtool
- Increase swap space: http://stackoverflow.com/a/22247782/1022903 (for non-Vagrant usage)
-
Config host machine 7. Exit vagrant ssh shell 8. Edit
/etc/hosts
to add line: * << ip address >> dokku.me 9.cat ~/.ssh/id_rsa.pub | ssh dokku.me "sudo sshcommand acl-add dokku $USER"
* (reference: https://github.com/progrium/dokku/blob/master/docs/installation.md) 10. Update build-step * git clone https://github.com/progrium/buildstep.git * cd buildstep * git pull origin master * sudo make build * (reference: http://progrium.viewdocs.io/dokku/upgrading) -
Create a project and push
git remote add dokkudev [email protected]:<< app name >>
git push dokkudev master
- For each config:
dokkudev config:set << app name >> ...
- Or, ssh into vagrant
cd << vagrant folder >> && vagrant ssh
- And, edit
~dokku/<< app name >>ENV
directly - ** remember to include
export
in front of each lines -
dokku config:set << app name >> a=b
# to cause config reload
- And, edit
dokkudev logs << app name >>
- If error arise:
setuidgid: fatal: unable to run failure
, do step 2.5 ('daemontools')
-
Install plugins
- log into vagrant
cd /var/etc/lib/dokku/plugins
git clone https://github.com/dyson/dokku-docker-options
cd /var/etc/lib
git clone https://github.com/dokku-alt/dokku-alt.git
cd /var/etc/lib/dokku/plugins
ln -s /var/etc/lib/dokku-alt/plugins/dokku-mariadb/
dokku plugins:install
-
Update MySQL
FLUSH TABLES WITH READ LOCK; FLUSH LOGS; SET GLOBAL binlog_format = 'MIXED'; FLUSH LOGS; UNLOCK TABLES; # http://dba.stackexchange.com/a/6753