avnomad.blogg.se

Digital ocean how to see docker ip and view
Digital ocean how to see docker ip and view










  1. #Digital ocean how to see docker ip and view update
  2. #Digital ocean how to see docker ip and view password

Encrypt SSH Key For Travis User And Add It To GitHub Repository Now your GitHub repository is ready to work with Travis CI.

digital ocean how to see docker ip and view

Enable it by clicking on the radio button. Your new repository should then show up in the list. Then navigate to Settings and click on the Sync account button. Jump over to Travis CI and log in with your GitHub credentials. Git push -u origin master Setup Travis CI On your local development machine, create a folder and run the following commands. Now it is time to create a GitHub repository. If you navigate your web browser to your server’s IP Address, you should see the updated page. Ln -sfn /opt/example-app/v1 /var/www/html/appĬhmod -R u=rwx,g=rwx,o=r /opt/example-app mkdir -p /opt/example-app/v1Įcho "Testing" > /opt/example-app/v1/index.html Using symlinks is a common practice when laying out deployments because you can easily switch versions by changing the symlink reference. We will be deploying to the /opt/example-app directory, and link the most recent deployment to /var/www/html/app.

digital ocean how to see docker ip and view

ssh -i /home/travis/.ssh/id_rsa Setup Folder Structure For The Deployments Quickly test that you can SSH with the travis user to your server. cat /home/travis/.ssh/id_rsa.pub > /home/travis/.ssh/authorized_keysĬhmod 0600 /home/travis/.ssh/authorized_keys SHA256:M3uDwzHA28KgzavzPWGsbhnbO0QmfJ94nBTKyS1QXC8 key's randomart image is:Īppend the public key to the authorized_keys file. Your public key has been saved in /home/travis/.ssh/id_rsa.pub. Your identification has been saved in /home/travis/.ssh/id_rsa. mkdir /home/travis/.sshĮnter file in which to save the key (/root/.ssh/id_rsa): /home/travis/.ssh/id_rsaĮnter passphrase (empty for no passphrase):

#Digital ocean how to see docker ip and view password

Be sure to leave the password empty, so that Travis CI doesn’t need to enter anything when deploying. Now setup an SSH Key pair for the travis user.

digital ocean how to see docker ip and view

cat /etc/httpd/conf/nf | grep Group Setup SSH For The Deployment User We know which group to add the user to by inspecting the nf file. useradd -c "Travis CI Deployment User" -G apache travis This is the user that Travis CI will use to perform the deployment. Create A Deployment UserĪdd a travis user, adding him to the apache group. If not, you may need to adjust your firewall rules on the server. You should now be able to point your web browser to yours server’s IP Address and see Apache’s welcome page.

#Digital ocean how to see docker ip and view update

$ ssh you’re logged in, update the system and install, start and enable Apache. Verify that you can SSH into your server from your local development machine. This process is left out to keep things brief. SSH Into Your New ServerĪfter logging in for the first time, it is a good practice to create a specific user for you to SSH in with. You may now select your droplet to find out it’s IP Address. Confirm the default options for the rest of your settings and create your droplet.

digital ocean how to see docker ip and view

Click on the New SSH Key button to paste in your public key, id_rsa.pub. Under the Authentication section, select SSH Keys for the type. Setup Your Digital Ocean DropletĪfter you have your SSH key pair, you can head over to Digital Ocean and create a droplet. If you don’t already have a pair setup, you can view this document. The first thing you’ll want to do is setup your SSH keys with ssh-keygen. To keep things simple and straight to the point, I will be deploying a static website. This post is intended for beginners who are wanting to see how to put these things together. I will focus on the bare essentials, which can be tweaked and improved upon depending on your setup. Today I would like to share how to setup automatic deployments using Digital Ocean, GitHub and Travis CI.












Digital ocean how to see docker ip and view