Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the acf domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131

Deprecated: Creation of dynamic property ACF::$fields is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields.php on line 138

Deprecated: Creation of dynamic property acf_loop::$loops is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/loop.php on line 28

Deprecated: Creation of dynamic property ACF::$loop is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/loop.php on line 269

Deprecated: Creation of dynamic property ACF::$revisions is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/revisions.php on line 397

Deprecated: Creation of dynamic property acf_validation::$errors is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/validation.php on line 28

Deprecated: Creation of dynamic property ACF::$validation is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/validation.php on line 214

Deprecated: Creation of dynamic property acf_form_customizer::$preview_values is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 28

Deprecated: Creation of dynamic property acf_form_customizer::$preview_fields is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 29

Deprecated: Creation of dynamic property acf_form_customizer::$preview_errors is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 30

Deprecated: Creation of dynamic property ACF::$form_front is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-front.php on line 598

Deprecated: Creation of dynamic property acf_form_widget::$preview_values is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 34

Deprecated: Creation of dynamic property acf_form_widget::$preview_reference is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 35

Deprecated: Creation of dynamic property acf_form_widget::$preview_errors is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 36

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the all-in-one-wp-migration domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp_plugin/wp_plugin.php on line 23

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 54

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1539

Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 828

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the rocket domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131

Deprecated: Creation of dynamic property acf_field_oembed::$width is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-oembed.php on line 31

Deprecated: Creation of dynamic property acf_field_oembed::$height is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-oembed.php on line 32

Deprecated: Creation of dynamic property acf_field_google_map::$default_values is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-google-map.php on line 33

Deprecated: Creation of dynamic property acf_field__group::$have_rows is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-group.php on line 31

Deprecated: Creation of dynamic property acf_field_clone::$cloning is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-clone.php on line 34

Deprecated: Creation of dynamic property acf_field_clone::$have_rows is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-clone.php on line 35

Deprecated: Creation of dynamic property jh_acf_field_table::$settings is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-table-field/class-jh-acf-field-table.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902
{"id":24559,"date":"2017-01-17T15:34:47","date_gmt":"2017-01-17T13:34:47","guid":{"rendered":"https:\/\/upcloud.com\/community\/tutorials\/get-started-dokku-debian"},"modified":"2017-01-17T15:34:47","modified_gmt":"2017-01-17T13:34:47","slug":"get-started-dokku-debian","status":"publish","type":"tutorial","link":"https:\/\/studiogo.tech\/upcloudold\/tutorial\/get-started-dokku-debian\/","title":{"rendered":"How to Get Started with Dokku Debian"},"content":{"rendered":"\n

Having the freedom of cloud infrastructure<\/a> can be liberating but sometimes you just want a simple and easy solution to develop and deploy web applications. Dokku is an extensible, open-source Platform-as-a-Service<\/a> that can run on any single server of your choosing. With Dokku Debian you can easily set up your very own PaaS in a very small implementation that is not hungry for server resources. Powered by Docker, Dokku can help you build and manage your application lifecycle in the cloud.<\/p>\n\n\n\n

This guide will help you get Dokku Debian installed, configured, and tested, along with tips on getting the most out of your personal cloud platform. The instructions in this guide are intended for Debian 8, but Dokku is also available on Ubuntu<\/a> as well as on CentOS<\/a>.<\/p>\n\n\n\n

\n
Test hosting on UpCloud!<\/a><\/div>\n<\/div>\n\n\n\n

Installing Dokku<\/h2>\n\n\n\n

Dokku runs on almost any hardware and is well at home in the cloud. To run Dokku, your server should have at least 1GB of RAM which makes the preconfigured 1CPU\/1GB host an ideal starting point for testing your own PaaS.<\/p>\n\n\n\n

Start by deploying a server<\/a> with at least the minimum requirements.<\/p>\n\n\n\n

If you have a domain name available, set the server hostname to a subdomain such as dokku.example.com.<\/tt> You should configure your DNS provider to point the subdomain including a wildcard to the public IP of your Dokku server. This will allow you to personalise the platform from the get-go.<\/p>\n\n\n\n

We also recommend including your\u00a0SSH keys to your server at deployment to make logging in more secure and also to make configuring Dokku easier later on. If you have not already added your public SSH keys to your\u00a0UpCloud control panel<\/a>, here is a quick introduction to\u00a0Managing Your SSH Keys<\/a>.<\/p>\n\n\n\n

Once you have deployed your new Dokku server, follow the steps below to install the platform.<\/p>\n\n\n\n

Install the apt-transport-https to allow the package manager using the libapt-pkg library to access metadata and packages available in sources available over HTTPS.<\/p>\n\n\n\n

# Install the prerequisites\nsudo apt-get update -qq\nsudo apt-get install -qq -y apt-transport-https<\/pre>\n\n\n\n

Dokku is built on Docker and employs it to isolate applications, continue by installing Docker with the command below.<\/p>\n\n\n\n

# Install Docker\nwget -nv -O - https:\/\/get.docker.com\/ | sh<\/pre>\n\n\n\n

Dokku is available in a public package cloud repository, add their key and source to your sources list, and then update your package list.<\/p>\n\n\n\n

# Add Dokku apt repository\nwget -nv -O - https:\/\/packagecloud.io\/gpg.key | sudo apt-key add -\nexport SOURCE=\"https:\/\/packagecloud.io\/dokku\/dokku\/ubuntu\/\"\necho \"deb $SOURCE trusty main\" | sudo tee \/etc\/apt\/sources.list.d\/dokku.list\nsudo apt-get update -qq<\/pre>\n\n\n\n

Then finally install Dokku and its core dependencies.<\/p>\n\n\n\n

# Install Dokku, when asked, select YES to enable web setup\nsudo apt-get install -qq -y dokku\nsudo dokku plugin:install-dependencies --core<\/pre>\n\n\n\n

The commands above will install the required dependencies such as Docker Engine and Herokuish along with Dokku Debian itself.\u00a0The installation takes only a couple of minutes and works best on a freshly deployed system.<\/p>\n\n\n\n

If you get an error saying\u00a0your hostname could not be resolved or you do not have a domain name available you can use the default reverse DNS name of your UpCloud server for testing. It can be found in your UpCloud control panel in server settings under the IP Addresses<\/em> tab. To change the hostname after deployment, set the system domain name in the \/etc\/hostname<\/tt> file on your server then\u00a0restart the host.<\/p>\n\n\n\n

Configuring the basic settings<\/h2>\n\n\n\n

When the installation is complete, you will need to perform a basic configuration available on a temporary web page on your Dokku server. Browse to your server domain name or IP address to finalise the installation.<\/p>\n\n\n\n

Note: To secure your Dokku host, it is important to complete the web setup process.<\/p>\n\n\n\n

\"Dokku<\/figure>\n\n\n\n

If you already included an SSH key at the server deployment it should show in the Public Key<\/em> list for Admin Access<\/em>. The keys in this list will be added to the dokku<\/tt> user account that is used to manage the application. Set at least one SSH key or include multiples each starting on their own line.<\/p>\n\n\n\n

The Hostname field should show your domain name set when deploying the server. If you do not have a domain name available, you can use the default reverse DNS name again here.<\/p>\n\n\n\n

Lastly, if you have a domain name set and configured at your DNS provider, you may wish to enable the virtual host naming for apps<\/em>. The option tells Dokku to make installed services accessible through <app-name>.dokku.example.com<\/tt> subdomains. Make sure to configure a wildcard A record for your domain to allow access to the application subdomains.<\/p>\n\n\n\n

A   *.dokku.example.com   <public IP address><\/pre>\n\n\n\n

When you have made the changes and selections you wish, click the Finish Setup<\/em> button at the bottom of the page to apply the settings. Finalising the settings will close the setup page preventing unauthorised access to adding public keys to your host.<\/p>\n\n\n\n

Your Dokku Debian platform should now be installed and ready to deploy applications. Continue below with testing the platform with a simple example app.<\/p>\n\n\n\n

Testing the platform<\/h2>\n\n\n\n

Dokku integrates well with GitHub and its tools. Deploying applications can be done through git commands from your local machine allowing Heroku-compatible applications to be easily pushed onto a server. The applications are built with Heroku build packs and run isolated in their own containers creating a single-host cloud Heroku setup.<\/p>\n\n\n\n

To get the most out of Dokku, you will need a GitHub account<\/a>. Sign up if you have not already and add an SSH key to your account<\/a> for secure authentication from your local system. Make sure to add keys to your local SSH agent for both the GitHub and your Dokku server.<\/p>\n\n\n\n

Start by creating a new application on your Dokku server using the command below.<\/p>\n\n\n\n

# On your Dokku server\ndokku apps:create ruby-rails-sample<\/pre>\n\n\n\n

The app will require a Postgres plugin which can be installed with the following command.<\/p>\n\n\n\n

# Install Postgres plugin your Dokku server\nsudo dokku plugin:install https:\/\/github.com\/dokku\/dokku-postgres.git<\/pre>\n\n\n\n

Then create a new database for the sample app.<\/p>\n\n\n\n

# Create a database on your Dokku server\ndokku postgres:create rails-database<\/pre>\n\n\n\n

The official datastore offers a method to link the database service to an application. Use the command underneath to enable the sample app to access the database reserved for it.<\/p>\n\n\n\n

# Link the database to the application on your Dokku server\ndokku postgres:link rails-database ruby-rails-sample<\/pre>\n\n\n\n

With the Dokku server ready to receive the application, continue by downloading the sample app from GitHub on your local computer. In case you do not already have Git installed, you can find quick installation instructions for many different operating systems over at the git download page<\/a>. The commands below are intended to be run on a Linux system.<\/p>\n\n\n\n

# On your local system\ngit clone git@github.com:heroku\/ruby-rails-sample.git ~\/ruby-rails-sample<\/pre>\n\n\n\n

Then change into the downloaded repository directory and add a new remote location for git that points to your Dokku server with the application name added to the end of the domain name as shown in the example command below. Replace the <dokku.example.com><\/tt> with your domain name.<\/p>\n\n\n\n

# On your local system\ncd ~\/ruby-rails-sample\ngit remote add dokku dokku@<dokku.example.com>:ruby-rails-sample<\/pre>\n\n\n\n

You can then push the application onto your Dokku server with the following command.<\/p>\n\n\n\n

# On your local system\ngit push dokku master<\/pre>\n\n\n\n

Once the deployment finishes, the application should be available on your Dokku server at the URL shown at the end of the output ruby-rails-sample.<dokku.example.com><\/tt> for example. Click the link in your terminal or browse to the address to test the application.<\/p>\n\n\n\n

\"Ruby<\/figure>\n\n\n\n

Congratulations, when you get a hello page similar to the example above, you have successfully deployed your first app on Dokku.<\/p>\n\n\n\n

Conclusions<\/h2>\n\n\n\n

Deploying a single host scalable Platform-as-a-Service in the cloud could not be much easier than with Dokku. One of the strengths of Dokku is the extent of already available plugins<\/a>, but also that Dokku is making it possible to write your own in any language. Sharing your plugins online and extending those already available will help the platform to grow. Dokku\u2019s simple core is intended to be easy to hack and expand upon with features you need.<\/p>\n","protected":false},"featured_media":6221,"comment_status":"open","ping_status":"closed","template":"","community-category":[113],"class_list":["post-24559","tutorial","type-tutorial","status-publish","has-post-thumbnail","hentry","community-category-integrations"],"acf":[],"_links":{"self":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/tutorial\/24559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/tutorial"}],"about":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/types\/tutorial"}],"replies":[{"embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/comments?post=24559"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media\/6221"}],"wp:attachment":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media?parent=24559"}],"wp:term":[{"taxonomy":"community-category","embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/community-category?post=24559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}