One place for hosting & domains

      January 2019

      Keep Your Blog Fresh: How to Repurpose Old Posts


      I’m just going to throw this out there: dealing with old content on your website has a lot more in common with cleaning out your sock drawer than you’d think.

      Yes, socks. Hear me out.

      No one ever wants to clean out the sock drawer, and while you’re procrastinating, those old, hole-ridden, stinky socks are piling up, taking up precious real estate. As the stinkers take up more space, it gets harder to find the fresh, new socks you actually want to wear.

      When you have dated material clunking up your website, it’s not as easy for people to find the new posts you want to show off. Just like a little spring cleaning goes a long way, you’ll want to do the same for your website. It isn’t quite as bad a chore as you’d expect,  and the benefits are tenfold.

      Here’s why you should keep your blog fresh — and a guide on what to do with those old posts.

      Do I Really Need to Go Through Old Content?  

      The answer is a big ‘yes.’

      “Your blog is a reflection of your company,” says Kathryn Marr, co-founder of digital marketing and web development company, Blue Ivory Creative. “It shows that you’re knowledgeable in your industry, provides valuable information that keeps potential clients interested, and is one of the keys to a successful SEO strategy. So if you haven’t posted in a while and if your content is outdated or incorrect, then you’re not making the most of an extremely valuable tool. Plus, depending on your site, it can result in decreased search engine rankings and potential liabilities.”

      Just imagine if someone finds your site and clicks on an old post that is riddled with outdated information. Do you think that visitor will take your site — and potentially your business — seriously after that?

      If someone spots numbers or statistics that are no longer correct, he might assume you’re either not knowledgeable about your industry, or you don’t care about the information you present to potential clients.

      “Internet users move quickly,” says Phil Weaver, CMO of Learning Success. “Often they may land on a post from a search query and not realize that the post is very old. If the post is no longer accurate, this may reflect badly on the company. This problem can be magnified if the post gets a lot of search engine traffic, slowly eating away at the company’s reputation. Inaccurate posts that get traffic can taint the company image in the minds of visitors to that page. This could be a problem that adversely affects a company for a long period, damaging company image without the cause being discovered.”

      Another reason to update your site regularly is old posts can be bad for SEO. “Google does like to see a history of great, consistent content so, in a lot of ways, old blog posts are beneficial to SEO, if they’re high-quality, relevant, and well-optimized,” Marr says. “But, there are three scenarios in which old posts can hurt you.”

      1. If your blog itself is old and hasn’t been updated in a long time, Google will see those way-back-there publishing dates and push you to the bottom of search results. That’s why updating those old posts and writing new ones consistently is key.
      2. Your old posts could have been optimized for outdated SEO standards that now have penalties associated with them. For example, before 2011, keyword stuffing — that’s adding as many keywords as possible into your content — was encouraged, but now it’s bad practice and can lead to Google penalties.
      3. With older posts, you may have been trying to rank for different keywords. However, Google can only display so many of your site pages and posts on the top few pages of their search engine, which can make it more difficult for your relevant, targeted posts to rank well.

      Plus, updating content is a lot more cost-effective than to create new content constantly.

      “Content creation is a very resourceintensive process,” Weaver says. “Each old post should be considered a business asset. Just like any business asset, old posts should be maintained to get the maximum benefit from that asset.”

      A common mistake is people thinking the more content they have up on their site, the better, so that’s why they don’t pay attention to older posts. But the truth is, it should always be about quality over quantity.

      “There’s this content marketing myth that goes something like this: Post as often as you can to get more traffic,” says Camilla Hallstrom, content marketing consultant at Influence With Content. “Sure, that might have worked five years ago, and yes, it might still work today, to some extent. But quality rules. People engage more with quality content, and it’s the best way to build a brand they love. After all, there’s a lot of noise online. The only way to stand out is to create something worth caring about. And that’s why updating content is so important. Quality takes time, and the only way to ensure all your content is top-notch is to focus on a smaller pool of content.”

      How Often Do You Need to Update Your Content?

      The answer can vary according to the type of work you do and the nature of your site, but a good rule of thumb is to do a thorough review annually.

      “I recommend content managers try to complete a full content audit once a year, provided your catalog isn’t thousands of articles deep,” says Sam Warren, marketing director at RankPay. “The larger your catalog, the more likely it is that you’ll want to develop a process for rolling updates in lieu of taking a project-based approach.”

      If your industry is competitive, fast-moving, or frequently has innovations, then you’ll probably need to update your content more often to give yourself an edge — particularly in industries such as law, finance, and marketing.

      “Why? Think about how you use Google or any other search engine,” Hallstrom says. “When you search for something, you have lots of options, so you need to decide which headline to click on. It’s much likelier that you’ll click on something that was published or updated recently than something that was last updated four years ago. And if you have a headline like ‘The 7 Best Computers (2018 Edition),’ that’s a lot more compelling than a generic headline like ‘The 7 Best Computers’ because it’s so much more specific to you as the user.”

      Also, if there’s a significant breakthrough, an innovation or something similar, Hallstrom suggests updating your content within the next month or so.

      How Do You Choose Which Posts to Update?

      While updating a post might sound like a lot of work to you, think of the time and effort that you’ve already put into your content. Sometimes just a few text tweaks or new images is all you need to make old posts fresh and relevant again. Here’s how to decide which are worth revamping.

      Measure Analytics

      “You might have more than a few blog posts on your site, and in that case, it doesn’t make sense to update all your content on a regular basis,” Hallstrom says. “Instead, check your analytics once in a while (at least every 12 months) to identify your top content.” That means content that gets traffic, content that could get traffic in the future, and content that converts.

      You can check this with tools like Google Analytics; Be sure to add conversions to the analytics you’re tracking. You’ll want to update posts that are already ranking high on Google to ensure you maintain your spot, posts that are close to ranking high (since just a few updated tweaks can increase their standing) and posts that once got a lot of attention on social media — since they’re no longer fresh and relevant, they aren’t being shared anymore.

      Research Your Industry

      Take the time to see what’s new in your field. Any news might be worth updating your content to include. “Then, research your competition,” Hallstrom says. “Has new content been published that outranks you on Google?”

      Check Your User Metrics

      See how people interact with your content, including how much time is spent on pages and bounce rates. This can be found via Google Analytics. If that engagement is low, there are updates you can make to improve it. Also, check user comments to see if people have questions about your content — you’ll want to add answers to your refresh. “You can also use user metrics to improve your conversions,” Hallstrom says. “If your content isn’t converting as it should, these metrics will help you understand why and what you can do to improve it.”

      Conduct an SEO Analysis

      Make sure your SEO is up to date by checking keyword analytics to ensure you use the right keywords since search habits can change over time. “The insights you get from your user metrics will help you decide if your content needs to be optimized for engagement,” Hallstrom says. “Remember, this is an important metric for Google! Use Google Search Console to see what keywords people use to find your content and to check your click-through rates. These metrics can pinpoint if your SEO titles need updates.”

      What’s the Best Way to Update Older Posts?

      Not every refresh is equal. Some will require more heavy lifting than others, and use the information you found during your research to help you determine exactly what that makeover should look like.

      “Use the insights you’ve gained to improve your titles, texts, and images,” Marr says. “For example, maybe there’s new data you can use to include in a graph? Update your SEO and improve the user experience, if possible. You want your posts to have accurate information, be optimized strategically for specific keywords, and contain relevant photos. Each post should play a role in your overall marketing strategy, and refreshing them to fit into your strategy can make them even more valuable.”

      Keep these approaches to recycling old content in mind:

      • Turn old posts into infographics. “Use the content and statistics from your blog post to create an easy-to-understand visual infographic,Marr says. “These are great for generating social shares — especially on platforms like Pinterest — and for presenting your information quickly.”
      • Get new facts. Update old posts with new information, such as current statistics and news. Add relevant details that might not have been around when the original post was created.
      • Refresh for social. “If it did really well in social media then what we generally do is look over the post and see how we can improve it,” Weaver says. “Are the resources still fresh? Are there others we can add? Has more information come to light over this time frame? Are our call to actions good? Do we have a strong lead and kicker? We do everything we can to improve the article, and then we repost.” And don’t forget to promote it again.
      • Create “best of” posts. Consider this your version of a greatest hits album. This is a way to categorize collections of old posts and make them feel fresh again, and could be anything from ‘Our Top 20 Marketing Tips’ or ‘Best How-To Arrange Flowers Posts of 2017.’
      • Film a video for an old post. “This works really well for tutorials, recipes, and similar types of posts,” Marr says. “Film a video walking your readers through something you described in a blog post. Then, share it on your social media accounts and add it to the old post for more engagement.”
      • Do a mini makeover. “If it is good information, but it did not do exceptionally well, then we closely look at the title and image,” Weaver says. “We will likely rewrite the title and replace the image.” You’ll be amazed at what a difference this can make. Catchy, clickable images don’t just make a post more visual — it also makes it much more likely to be shared on social media.
      • Enable rich snippets on your blog. “These provide additional information that will show up on search engines like reviews, author information, etc.,” Marr says.

      How Can You Use Old Posts to Improve SEO?

      A refreshed old post can be just as valuable as a brand new post. “Consistent, high-quality posts are critical for a good SEO strategy,” Marr says. “Optimizing them for specific, strategic keywords, adding alt tags to images, and increasing the length and quality of content can go a long way to making that content rank. You can also use old evergreen posts to drive traffic through social media and email marketing.”

      Using a keyword tool, such as Ahrefs or Buzzsumo, Warren recommends taking a look at how the keyword landscape has shifted for each piece of content.

      “Maybe your original keyword has lost significant volume, or maybe a competitor came in and created something even better than your original piece,” he says. “Whatever the cause, it’s often going to be worth the effort to identify the most promising keywords that the old content can rank for and then go after them.”

      Other ways to boost SEO is increasing the post length, adding optimized meta descriptions and titles, avoiding outdated SEO practices like keyword stuffing, linking to related posts that your audience might find interesting and useful, and adding compelling images and set up alt tags both for search engines and accessibility.

      Of course, while SEO is essential for driving traffic, you also want to focus on engagement.

      “To make sure your content is as engaging as it gets, it needs to be valuable, and most often, that means you need to write long-form content so that you have room to include everything you want to talk about,” Hallstrom says.

      “Your content needs to be easy to read and skim through — simple words, short sentences, and short paragraphs,” she adds. “Make sure you offer an amazing user experience. That’s what makes Google happy no matter how many times it changes algorithms.”

      Don’t Forget to Toot Your Own Horn (Again)

      Once your old-is-new-again content is refreshed, it’s time to promote it. “Old posts can drive new traffic by putting them on a similar promotion schedule as new posts,” Weaver says. “Plus, the social sharing links already showing shares from the last go-around looks good to new visitors and may incite more shares.

      How you promote refreshed content is largely dependent on the channel you use. For social media, it is usually appropriate to promote it in the same way you promote new content. Since your social media audience is constantly changing, it’s likely that many of your followers did not see the post the first time around.

      For others that did see it, it is very likely that they have forgotten or vaguely remember and are happy to engage with that content again.”

      For email lists, it’s better to only send to subscribers who have not previously opened an email promoting that content. And depending on the design of your site, you can push the revamped content to the front page again.

      Other ways to spread the word? Here are Marr’s suggestions:

      • Link to your old blog posts in new blog posts.
      • Reach out to bloggers and influencers who might be willing to share your posts with their audience.
      • Link to the posts in guest posts that you write for other sites.
      • Promote the stories as “with new content!” or “now updated!” on social.
      • Create “best of” posts that highlight categorized old posts.

      Whether new or old, you always want to attract the right traffic, so target your audience. “To ensure your content is attracting your target audience, you should check your analytics and ask yourself: ‘How do people find my content?’” says Hallstrom. “If you notice that a lot of site visitors find your content on Google, you’ll want to check what keywords they use. If those keywords are irrelevant to your products and services, you probably want to improve your SEO. Or, maybe you get traffic from a social media site like Twitter, but your audience hangs out on Pinterest. Then, you can update it to attract Pinterest users, so optimize your images and copy for Pinterest.”

      How Can You Give Your Blog Posts a Longer Shelf Life?

       There are a few tricks of the trade to avoid having to update your content as frequently. “If you create evergreen content from the get-go, you don’t have to worry as much about updating it,” Hallstrom says. “Make sure your content is the best content on your topic. Take a look at content that’s already out there. How can you make something that’s even better?”

      To help content last longer, avoid seasonal posts or content with a short time-frame of relevance. “Think about what people will want to read in five years,” Marr says. “Put the time into creating high-quality content that you’re going to be proud of years from now.”

      But ultimately, Warren advises against trying to make your posts last forever.

      “Often, being timely and current with your content will help it take off. You could try to remove popular culture references, dates, and other things to prolong shelf-life. But don’t diminish the potential impact of your content today in the hopes of avoiding refreshing it later.”

      Another way to consider it is approaching it from the vantage point of a visitor to your site. “Although many site owners feel that updating blog content is a nuisance, it can actually have a very high ROI,” Weaver says. “Site owners think content is old news, but for a site visitor, the content is new.”

      And while it might seem like deleting an old post is a quick fix, think again. “It’s important that you’re very careful when deleting old blog posts as it can affect your search engine rankings,” cautions Marr.

      “You should consider deleting an old blog post if it is no longer relevant nor can it be made relevant, the post is generating very low traffic or had negative responses, your services or products changed and the blog post is about old offerings,” she says. “Most of the time, though, it’s really best to repurpose and update the content. Don’t just delete blog posts to delete them. Have a good reason, backed by research, for removing that post.”

      That philosophy should apply to how you approach all the content on your site.

      “One of the biggest things that I can stress is to coordinate all of your blog post changes with an overarching website strategy,” Marr says. “And when you repurpose a post, do it in a way that really fits your business plan. For example, a video might not appeal to your audience, but an infographic might resonate really well!”

      Hopefully, the many perks of refreshing old posts will convince you that cleaning out your sock drawer isn’t so bad after all.

      Just like you won’t have to buy as many new socks, you don’t have to produce new content all the time either. “Instead, you ensure your existing content is the best of the best,” Hallstrom. “It takes some work up front, but you’ll be reaping the rewards for years to come.”

      Refreshed Content? Check!

      Now get everything you need to take your website to the next level. DreamHost plans start at $2.59/mo.



      Source link

      Install GitLab on Ubuntu 18.04


      Updated by Linode

      Contributed by

      Linode

      GitLab is a complete solution for all aspects of your software development life-cycle. At its core, GitLab serves as your centralized Git repository. It also features built-in tools that represent every task in your development workflow, from planning to testing to releasing. You can host your own GitLab instance on a Linode, instead of using third-party hosting. Self-hosting your software development with GitLab offers total control of your codebase while providing an easy to use interface for team members. GitLab is the most popular self-hosted Git repository, so you’ll benefit from a robust set of integrated tools and an active community.

      This guide will walk you through the steps to install GitLab on an 8GB Linode running Ubuntu 18.04. This installation can support up to 100 users.

      System Requirements

      Before installing GitLab you should consider how many users will collaborate on your self-hosted instance, the size of the repositories you will store, and the recommended minimum system requirements. This criteria will will effect the needed storage, CPU, and memory. This guide will use an 8GB Linode plan to fulfill GitLab’s minimum system requirements. The suggested hardware is as follows:

      • Storage The required storage depends on the size of the repositories you will store in GitLab. You should plan to have at least as much free space as all the repositories combined require.
      • CPU: 2 cores is the recommended number and supports up to 500 users. While you can use 1 CPU core to support 100 users, the application may run slower because all workers and background jobs will run on the same core.
      • Memory: 8 GB to support up to 100 users.

      Before You Begin

      1. Familiarize yourself with our Getting Started guide and complete the steps for setting your Linode’s hostname and timezone.

      2. This guide will use sudo wherever possible. Complete the sections of our Securing Your Server to create a standard user account, harden SSH access and remove unnecessary network services.

      3. Add a domain zone, NS record, and A/AAA record for the domain you will use to access your GitLab installation. See the DNS Manager guide for details. If you will access your GitLab instance via your Linode’s IP address, you can skip this step.

      4. Create an SSL Certificate, if you will be using SSL encryption for your domain (this is recommended). Be sure to note the location that Certbot uses to store all generated keys and issued certificates.

      5. Update your system:

        sudo apt-get update && sudo apt-get upgrade
        

      Install GitLab

      1. Install all required dependencies:

        sudo apt-get install -y curl openssh-server ca-certificates
        
      2. Install Postfix to send email notifications:

        sudo apt-get install -y postfix
        

        When prompted, select Internet Site and press Enter. Use your server’s external DNS for mail name and press Enter.

      3. Add the GitLab package repository:

        curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
        
      4. Install the GitLab package. Replace gitlab.example.com with the domain you will use to access your GitLab installation. The installation will automatically configure and start GitLab.

        sudo EXTERNAL_URL="http://gitlab.example.com" apt-get install gitlab-ee
        
      5. In your browser of choice, navigate to the URL you provided in the previous step. You will be redirected to GitLab’s password reset screen. You should provide a password for the GitLab administrator account.

        GitLab password reset

      6. You will be redirected to the login screen. Enter root as the username and the password you just created to log in.

        GitLab welcome screen

      Configure SSL Encryption

      Note

      If you did not generate an SSL certificate using Certbot prior to the installation of GitLab, you may need to first stop GitLab and then generate the SSL certificate to bypass any errors related to Certbot’s certificate challenge. To stop GitLab run the following command:

        sudo gitlab-ctl stop
      

      Once you are done generating the certificate, restart GitLab with the following command:

        sudo gitlab-ctl start
      
      1. Edit the /etc/gitlab/gitlab.rb to use HTTPS. This is done by modifying the value of external_url to use https instead of http:

        /etc/gitlab/gitlab.rb
        1
        2
        3
        4
        5
        6
        
        ## GitLab URL
        ##! URL on which GitLab will be reachable.
        ##! For more details on configuring external_url see:
        ##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
        external_url 'https://gitlab.example.com'
              
      2. Edit the /etc/gitlab/gitlab.rb file to point to the location of your SSL certificate and key. The path should be the location used by Certbot to store the certificates when they were initially created.

        /etc/gitlab/gitlab.rb
        1
        2
        3
        
        nginx['ssl_certificate'] = "/etc/letsencrypt/live/gitlab.example.com/fullchain.pem"
        nginx['ssl_certificate_key'] = "/etc/letsencrypt/live/gitlab.example.com/privkey.pem"
              
      3. Redirect all HTTP traffic to HTTPS:

        /etc/gitlab/gitlab.rb
        1
        2
        
        nginx['redirect_http_to_https'] = true
              
      4. Issue the following command to enable your new configurations:

        sudo gitlab-ctl reconfigure
        
      5. Navigate to your GitLab instance domain and verify that you are directed to https.

      You are now ready to begin using GitLab as your remote version control system. Refer to GitLab’s official documentation for details on how to get started administering your GitLab instance.

      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.

      Find answers, ask questions, and help others.

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



      Source link

      Install GitLab with Docker


      Updated by Linode

      Contributed by

      Linode

      GitLab is a free Git repository management application, like GitHub or Bitbucket, that you can run on your own Linode. This guide will show you how to install GitLab using the official GitLab Docker image.

      The GitLab application has a number of services it depends on, including PostgreSQL, Nginx, and Redis. A major benefit of using Docker to install GitLab is that these dependencies are isolated to a single easy-to-update and self-contained image.

      Before You Begin

      Choose An Appropriately Sized Linode

      GitLab is a resource-intensive application. To get the most out of GitLab, we recommend a Linode with at least 8GB of memory and at least 2 CPU cores. For more information on system requirements, visit the GitLab Hardware Requirements page.

      Note

      This guide was written for and tested with Ubuntu 18.04. You may be able to adapt this guide to other operating systems supported by Docker. When following this guide under another OS, use the Docker installation instructions for that OS.

      Secure your Server

      Review and implement the measures in the How to Secure your Server guide, including creating a limited user account.

      Change your Linode’s Default SSH Port

      One of GitLab’s features is the ability for you to push and fetch code changes to and from your repository over SSH. When installing GitLab, the software will need to bind to port 22, which is the standard port for SSH. Your system’s SSH service already runs on this port by default, so you will receive an error from GitLab if you don’t address this conflict.

      To fix this, you’ll want to change the port that your system’s SSH service listens on. This can be accomplished by editing your Linode’s /etc/ssh/sshd_config file and changing the Port assignment. The example snippet below changes the port from 22 to port 26:

      /etc/ssh/sshd_config

      When editing the file, you may also need to uncomment the Port line by removing the # character from the start of the line, if one is present. After updating this file and saving the change, restart the SSH service:

      sudo systemctl restart sshd
      

      Close your current SSH session and create a new one, making sure to specify the new port. You can do this by supplying the -p flag:

      ssh [email protected] -p 26
      

      (Optional) Update your DNS Records

      Assign a domain or subdomain to your GitLab server. This step is optional, as you can always access GitLab via your server’s IP address. However, using a domain is necessary if you would like to take advantage of GitLab’s built in SSL support, which uses Let’s Encrypt to issue certificates. This guide’s examples will use gitlab.example.com.

      It takes some time for DNS changes to propagate through the internet, so it’s suggested that you do this before you set up GitLab. There are several options for updating your DNS records:

      • If you already use Linode’s name servers, or if you would like to use them for your domain, review the DNS Manager guide. You will need to set up an A record which is assigned your Linode’s IP address.

      • If you use a different DNS provider, review that provider’s documentation for setting up a new A record.


        Updating DNS records at common nameserver authorities

        The following support documents describe how to update DNS records at common nameserver authorities:

      You can test to see if your DNS changes have propagated with the dig command:

      dig +short gitlab.example.com
      
        
      192.0.2.2
      
      

      Once your changes have propagated, you can move forward with the installation.

      Install Docker

      You must have Docker installed on your Linode to continue.

      These steps install Docker Community Edition (CE) using the official Ubuntu repositories. To install on another distribution, see the official installation page.

      1. Remove any older installations of Docker that may be on your system:

        sudo apt remove docker docker-engine docker.io
        
      2. Make sure you have the necessary packages to allow the use of Docker’s repository:

        sudo apt install apt-transport-https ca-certificates curl software-properties-common
        
      3. Add Docker’s GPG key:

        curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
        
      4. Verify the fingerprint of the GPG key:

        sudo apt-key fingerprint 0EBFCD88
        

        You should see output similar to the following:

          
        pub   4096R/0EBFCD88 2017-02-22
                Key fingerprint = 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
        uid                  Docker Release (CE deb) 
        sub   4096R/F273FCD8 2017-02-22
        
        
      5. Add the stable Docker repository:

        sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
        
      6. Update your package index and install Docker CE:

        sudo apt update
        sudo apt install docker-ce
        
      7. Add your limited Linux user account to the docker group:

        sudo usermod -aG docker $USER
        

        Note

        After entering the usermod command, you will need to close your SSH session and open a new one for this change to take effect.

      8. Check that the installation was successful by running the built-in “Hello World” program:

        docker run hello-world
        

      Install the GitLab EE Image

      After installing Docker, download the latest GitLab Enterprise Edition Docker image from DockerHub. This image contains everything GitLab needs in order to run: PostgreSQL, Nginx, Redis, etc. To download the image, run the following pull command:

      sudo docker pull gitlab/gitlab-ee:latest
      


      Community Edition or Enterprise Edition?

      The GitLab Enterprise Edition software does not actually require you to have a license to use it. If you do not supply a license after installation, it will automatically show you the GitLab Community Edition feature set instead.

      If you’d like, you can instead opt to download GitLab Community Edition. This will offer the same features as an unlicensed Enterprise Edition installation. The key difference between these software packages is that the features of the EE installation can be upgraded at any time by entering a license.

      The primary reason someone might download the Community Edition is if they prefer to only download open source software. For more information on GitLab’s licensing, review the GitLab article on this subject. To download the GitLab CE Docker image, run this command:

      sudo docker pull gitlab/gitlab-ce:latest
      

      It may take a few minutes to download the image. When the download is complete, you can view a list of all installed Docker images with the images command:

      sudo docker images
      

      Configure and Run GitLab

      In order to configure and run the GitLab container, you need to provide a few options at runtime.

      1. Consider the following command, a version of which you will use to start the GitLab container:

        sudo docker run --detach 
          --hostname gitlab.example.com 
          --publish 443:443 --publish 80:80 --publish 22:22 
          --name gitlab-linode 
          --restart always 
          --volume /srv/gitlab/config:/etc/gitlab 
          --volume /srv/gitlab/logs:/var/log/gitlab 
          --volume /srv/gitlab/data:/var/opt/gitlab 
          --env GITLAB_OMNIBUS_CONFIG="external_url 'https://gitlab.example.com/';" 
          gitlab/gitlab-ee:latest
        


        Descriptions for each option

        --detach runs the Docker container as a background process, as opposed to running it in the foreground.

        --hostname defines the container’s internal hostname.

        --publish tells the container to publish ports, or ranges of ports, to the host. Because GitLab accepts connections on the HTTP (80), HTTPS (443), and SSH (22) ports, this option is declared three times. If you wanted to access GitLab from a non-standard port on your host, you would provide the host port first, and the container port second after the semi-colon. For instance if you wanted to access GitLab SSH on port 3333, you would write --publish 3333:22.

        --name allows you to apply a label to your container, for use when referencing the container within a Docker network.

        --restart specifies a restart policy for the container. Here it is set to always, meaning that the container, if exited, will automatically be restarted.

        --volume defines the host mounted volumes the container uses to store persistent data. These three volumes store application data, log files, and configuration files. The value to the left of the the semi-colon is the local location, and the value to the right is the container location.

        --env supplies the variable GITLAB_OMNIBUS_CONFIG, which can hold a series of values, separated by a colon, that correspond to the GitLab Omnibus configuration settings. In this case, an external URL is supplied. Some additional settings might include SMTP configuration values so that GitLab can send activity emails.

        As of GitLab 10.7, if you provide an external URL with a HTTPS protocol, GitLab will automatically set up SSL certificates using Let’s Encrypt, and all traffic will be forwarded to HTTPS. For more information about this functionality, read the GitLab SSL Documentation

        As an alternative to specifying the GITLAB_OMNIBUS_CONFIG variable via the --env option, you can edit the GitLab configuration file directly. For more instructions on how to do that, visit the Configure GitLab documentation.

      2. In the above command, replace the values for the --hostname option and for the external_url configuration setting with the domain or subdomain for your GitLab site. If you did not set up DNS for your site, enter http://your_linode_ip (not https) for the external_url setting. Then, run the command.

        Note

        If you are using the GitLab Community Edition image, replace gitlab/gitlab-ee:latest with gitlab/gitlab-ce:latest

        The container may take a few moments to start. After it starts, you’ll be given a container ID like the following:

          
        1093d89f9a0af8e4c79e0352e57721b09050d07c86c37d601145a856f3ed1502
        
        
      3. It will take an additional few minutes to be able to access GitLab in your browser after the container starts. You can find out more information about the startup process by monitoring the logs:

        sudo docker logs -f gitlab-linode
        

        To exit from the log monitoring process, enter CTRL-C. This will not stop the container from running.

      4. Load the GitLab site in your web browser. If you try to load it too shortly after starting the container, you may see an HTTP 502 error. If this happens, try waiting for a few more minutes and then refresh your page.

      5. The first time you access the site it will prompt you to enter an administrative password. Enter a complex password and record it somewhere safe.

      6. Log in to your GitLab site by entering root as the user along with the password you created in the previous step.

      Create your First Project

      Each repository in GitLab belongs to a project. A project includes: a repository for your files, an issues tracker, a section for merge requests, a wiki, continuous integration and continuous delivery (CI/CD) pipelines, and other features to support your development.

      1. To create your first repository, click Create a project.

        From the welcome screen, click "Create a project"

      2. You will be taken to the New Project page. Enter the project name. You can optionally alter the project’s slug, enter a description, or change the visibility of the project. Once you’re done, click Create project.

        Fill out the required information to make a new project

      3. Once your project has been created, you’ll be provided with an empty project repository:

        An empty project on GitLab

      4. If you didn’t have GitLab create a README.md file during project setup, instructions on how to start using your repository from the command line will be shown.

        Enter those commands on your computer to add a new README.md to your repository and push it back up to your GitLab repository. Change the domain in the git clone command to your site’s domain:

        git clone https://gitlab.example.com/testuser/example-project.git
        cd example-project
        touch README.md  # Or create the file in your editor and enter a project description
        git add README.md
        git commit -m "add README"
        git push -u origin master
        

      Manage the GitLab Container

      To view all of your running containers, you can issue the ps command:

      sudo docker ps
      

      To stop the GitLab container, issue the stop command by supplying the container ID you procured with the ps command, or supply the container name:

      sudo docker stop gitlab-linode
      

      To start a stopped container, issue the start command by supplying the container ID or container name:

      sudo docker start gitlab-linode
      

      Once the container has stopped, you can remove the container using the rm command, again supplying the container ID or container name:

      sudo docker container rm gitlab-linode
      

      Note

      Removing the container will not delete your projects and repositories.

      Upgrading GitLab

      To upgrade GitLab to the newest version, you must stop and remove the container, pull the newest image, and then recreate the container:

      sudo docker stop gitlab-linode
      sudo docker rm gitlab-linode
      sudo docker pull gitlab/gitlab-ee:latest
      
      sudo docker run --detach 
        --hostname gitlab.example.com 
        --publish 443:443 --publish 80:80 --publish 22:22 
        --name gitlab-linode 
        --restart always 
        --volume /srv/gitlab/config:/etc/gitlab 
        --volume /srv/gitlab/logs:/var/log/gitlab 
        --volume /srv/gitlab/data:/var/opt/gitlab 
        --env GITLAB_OMNIBUS_CONFIG="external_url 'https://gitlab.example.com/';" 
        gitlab/gitlab-ee:latest
      

      Remember to provide your own hostname, name, and external URL. If you are using GitLab Community Edition, specify the gitlab/gitlab-ce:latest image instead.

      Next Steps

      GitLab offers many features that are worth taking the time to understand and utilize. Here are a few next steps to take after you’ve completed this guide:

      • Upload an SSH key to your GitLab account so that you can transfer files over SSH.

      • Explore CI/CD pipelines to streamline your development practices.

      • Using your root GitLab account, explore the Admin settings to customize the functionality of GitLab.

      • Review Linode’s Git documentation:

      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.

      Find answers, ask questions, and help others.

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



      Source link