wget https://raw.githubusercontent.com/dokku/dokku/v0.10.5/bootstrap.sh;
sudo DOKKU_TAG=v0.10.5 bash bootstrap.sh
cat /path/to/public_key | ssh root@yourdokkuinstance "sudo sshcommand acl-add dokku [description]"
dokku apps:create your_app_name
FROM ruby:2.2
RUN curl -sL https://deb.nodesource.com/setup | bash - && \
apt-get install -yq nodejs build-essential libpq-dev && \
apt-get update
RUN mkdir /app
WORKDIR /app
ENV RACK_ENV "production"
ENV PORT 5000
COPY . .
RUN gem install bundler
USER root
# EXPOSE $PORT
ENTRYPOINT ["./startup.sh"]
#!/bin/bash
# Contents of startup.sh
bundle check || bundle install --without development,test
bundle exec rake assets:precompile
bundle exec rake db:migrate
bundle exec puma -e production
dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
dokku postgres:create the_db
dokku postgres:link the_db my_app
dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
dokku letsencrypt my_app