One place for hosting & domains

      How to Deploy Django with One-Click Apps

      Updated by Linode

      Contributed by

      Django One-Click App

      Django is a web development framework for the Python programing language. It enables rapid development, while favoring pragmatic and clean design. Django was initially developed for use in a newspaper’s website division, and as a result the Django framework is very well suited to developing content-centric applications. It’s also very flexible in its ability to facilitate many complex content management operations.

      Deploy Django One-Click App

      One-Click Apps allow you to easily deploy software on a Linode using the Linode Cloud Manager. To access Linode’s One-Click Apps:

      1. Log in to your Linode Cloud Manager account.

      2. From the Linode dashboard, click on the Create button in the top right-hand side of the screen and select Linode from the dropdown menu.

      3. The Linode creation page will appear. Select the One-Click tab.

      4. Under the Select App section, select the app you would like to deploy:

        Select a One-Click App to deploy

      5. Once you have selected the app, proceed to the app’s Options section and provide values for the required fields.

      The Django Options section of this guide provides details on all available configuration options for this app.

      Django Options

      You can configure your Django App by providing values for the following fields:

      Field Description
      Django APP Name Name for the Django application. This field cannot have spaces. Required.
      Django USER Username for your Django application. Required.
      Django Password Password for the Django USER. Required.
      Django USER email Email address for the Django USER. The format for the email must be in the form [email protected] Required.

      Linode Options

      After providing the app specific options, provide configurations for your Linode server:

      Configuration Description
      Select an Image Debian 9 is currently the only image supported by Django One-Click Apps, and it is pre-selected on the Linode creation page. Required.
      Region The region where you would like your Linode to reside. In general, it’s best to choose a location that’s closest to you. For more information on choosing a DC, review the How to Choose a Data Center guide. You can also generate MTR reports for a deeper look at the network routes between you and each of our data centers. Required.
      Linode Plan Your Linode’s hardware resources. Django can be supported on any size Linode, but we suggest you choose a Linode plan that reflects how many resources you plan on using. For small applications, a 1GB Nanode is sufficient. If you decide that you need more or fewer hardware resources after you deploy your app, you can always resize your Linode to a different plan. Required.
      Linode Label The name for your Linode, which must be unique between all of the Linodes on your account. This name will be how you identify your server in the Cloud Manager’s Dashboard. Required.
      Root Password The primary administrative password for your Linode instance. This password must be provided when you log in to your Linode via SSH. It must be at least 6 characters long and contain characters from two of the following categories: lowercase and uppercase case letters, numbers, and punctuation characters. Your root password can be used to perform any action on your server, so make it long, complex, and unique. Required.

      When you’ve provided all required Linode Options, click on the Create button. Your Django app will complete installation anywhere between 2-5 minutes after your Linode has finished provisioning.

      Getting Started after Deployment

      Access Django

      After Django has finished installing, you will be able to access your Django site at your Linode’s IPv4 address, for instance: https://yourlinodeip:8000.

      1. To find your Linode’s IPv4 address. Click on the Linodes link in the sidebar. You will see a list of all your Linodes.

      2. Find the Linode you just created when deploying your app and select it.

      3. Navigate to the Networking tab.

      4. The IP address will be displayed under the Address column in the IPv4 table.

      5. Copy and paste the IPv4 address into a browser window followed by :8000. You should see the Django test page appear.

        Django Test Page

      6. Once you have verified that you can access your Django site via the browser, you can log in using the admin credentials you created when deploying your app. Update the address in the browser to: https://yourlinodeip:8000/admin.

        Login to your Django site.

      7. Once logged in, you will have access to the Admin console. Now you can begin configuring your site.

        Django Admin Console

      More Information

      You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

      This guide is published under a CC BY-ND 4.0 license.

      Source link