cat /proc/swaps # Filename Type Size Used Priority # /var/swap/swap0 file 2097148 211176 -1
😼 Installation for Dokku
# login server by SSH ssh root@dokku.me
# Installing Dokku cd /tmp wget https://raw.githubusercontent.com/dokku/dokku/v0.7.2/bootstrap.sh DOKKU_TAG=v0.7.2 bash bootstrap.sh
🚕 Submit public SSH key & domain to dokku web page
Open dokku.me or 123.123.123.123 by your web browser and submit public SSH key & domain name.
🚌 Install Postgress on Dokku
# login server by SSH ssh root@dokku.me
# Install PostgreSQL plugin on dokku dokku plugin:install https://github.com/dokku/dokku-postgres.git
# Create instance of PostgreSQL dokku postgres:create dokku_sample_db
# Create instance of Application dokku apps:create dokku_sample_app
# Relate PostgreSQL instance with the application dokku postgres:link dokku_sample_db dokku_sample_app
🗻 Setup DNS
Setup domanin & IP to your DNS
dokku.me A 123.123.123.123 *.dokku.me A 123.123.123.123
🗽 Set domain & IP to your hosts
Add your domain & IP to local /etc/hosts:
123.123.123.123 dokku.me
🎉 Set SSH Configuration
Add SSH Configuration to local ~/.ssh/config:
Host dokku.me HostName 123.123.123.123 IdentityFile ~/.ssh/id_rsa.dokku.me User root
🐯 Deploy your app
# From your local machine git clone git@github.com:heroku/ruby-rails-sample.git
# Each official datastore offers a `link` method to link a service to any application git remote add dokku dokku@dokku.me:ruby-rails-sample
# Installing dokku command line tool gem install dokku-cli
# Set secret key for Rails bundle exec rake secret dokku config:set SECRET_KEY_BASE="上で生成された文字列" dokku config:set CURL_TIMEOUT=1200
# Deploy git push origin master
# Show app by browser dokku open
👽 dokku-cli Cheat Sheat
# Basic Commands dokku run # Run a one-off command in the environment of the app dokku ssh # Start an SSH session as root user dokku logs [-t] # Display logs for the app (-t follows) dokku help [COMMAND] # Describe available commands or one specific command
# Configuration Commands dokku config # Display the app's environment variables dokku config:get KEY # Display an environment variable value dokku config:set KEY1=VALUE1 [KEY2=VALUE2 ...] # Set one or more environment variables dokku config:set:file # Set one or more environment variables from file dokku config:unset KEY1 [KEY2 ...] # Unset one or more environment variables
# Process / Container Commands dokku ps # List processes running in app container(s) dokku ps:rebuild # Rebuild the app dokku ps:restart # Restart the app container dokku ps:start # Start the app container
# その他便利コマンド dokku nginx:build # (Re)builds nginx config for the app dokku open # Open the app in your default browser dokku url # Show the first URL for the app dokku urls # Show all URLs for the app
🐮 Dokku app at the root domain of the dokku server
VULTR provides high performance cloud compute environment for you.
Vultr has 15 data-centers strategically placed around the globe, you can use a VPS with 512 MB memory for just $ 2.5 / month ($ 0.004 / hour).
In addition, Vultr is up to 4 times faster than the competition, so please check it => Check Benchmark Results!!