Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Mattias Noback:
Containerizing a static website with Docker, part III
Jan 09, 2017 @ 17:48:46

Matthias Noback has posted the third part of his "containerizing a static website with Docker" service, continuing on from his previous two posts to look at deploying the environment he's created.

In the previous posts we looked at creating a build container, and after that we created a blog container, serving our generated static website.

It's quite surprising to me how simple the current setup is — admittedly, it's a simple application too. It takes about 50 lines of configuration to get everything up and running.

The idea of the blog container, which has nginx as its main process, is to deploy it to a production server whenever we feel like it, in just "one click". There should be no need to configure a server to host our website, and it should not be necessary to build the application on the server too. This is in fact the promise, and the true power of Docker.

He then gets into the two remaining steps in the process resulting in the deployment of the simple application: pushing to Docker Hub and deploying out to a DigitalOcean server. He includes all of the commands and configuration you'll need to get the process set up and work with the remote machine.

tagged: docker series container part3 deploy dockerhub digitalocean

Link: https://php-and-symfony.matthiasnoback.nl/2017/01/containerizing-a-static-website-with-docker-part-iii/

TutsPlus.com:
Building Your Startup With PHP: Choosing and Configuring Production Hosting
Oct 03, 2016 @ 15:47:19

The TutsPlus.com site continues their "Build Your Startup with PHP" series of tutorials with the latest part of the series. In this most recent article they move into the hosting world and offer some tips and setup options for your production hosting.

In this tutorial, I'll explore choosing an ideal hosting platform for Meeting Planner and the initial configuration of our server. I'll be guiding you through the process as I migrate the pre-launch website to a better production environment for our upcoming alpha launch.

[...] As a reminder, all of the code for Meeting Planner is written in the Yii2 Framework for PHP. If you'd like to learn more about Yii2, check out our parallel series Programming With Yii2.

They start by looking at how to choose the right hosting company for your application and abilities. For their particular needs, they opted for managed hosting (like Rackspace or Digital Ocean). For the remainder of the tutorial, they show the setup with Digital Ocean and a simple "droplet" (virtual machine instance). They walk you through the setup of the droplet, the server configuration for hosting the application and packages to install. Then they check out and set up the code for the "Meeting Planner" application and, finally, update the DNS to point to the new server.

tagged: startup hosting application production digitalocean

Link: https://code.tutsplus.com/tutorials/building-your-startup-with-php-choosing-and-configuring-production-hosting--cms-23359

Community News:
DigitalOcean's Hacktoberfest 2016
Sep 29, 2016 @ 14:46:57

It's that time of year again - the perfect time to get involved in Open Source. Why? Because DigitalOcean is back with Hacktoberfest once again, encouraging contributions to Open Source no matter the size.

The Laravel News site sums it up nicely:

Hacktoberfest, the month-long festival of code, is back again this year. The event is hosted in partnership between GitHub and DigitalOcean, and the rules are simple. If you make four pull requests between October 1st and October 31st, you’ll get a t-shirt. It’s available worldwide with no stipulations.

While the real incentive is to get more contributions to Open Source project, there's also a side benefit for those that get in their four pull requests during October: a cool t-shirt bearing the logo for this year's event. All you have to do is contribute and four pull requests to any repository (not your own ideally) before the end of October. If you're not sure of where to start and need some ideas, the Hacktoberfest site has you covered with some great suggestions to get you started.

tagged: hacktoberfest digitalocean github community opensource contribution

Link: https://hacktoberfest.digitalocean.com/

SitePoint Web Blog:
Heroku Alternative: Deploy Apps with Dokku on DigitalOcean
Jun 29, 2016 @ 15:28:54

On the SitePoint Web blog there's a new tutorial showing you how to deploy applications with Dokku on DigitalOcean in the same way that you might with Heroku.

When Heroku announced their (quite reasonable) new limits for free apps, I realized that I would have to find another source of hosting for all the small, low-traffic projects that I currently have running on Heroku. [...] Since I have such an unreasonable number of apps running on Heroku, I thought it was high time to try out Dokku. Dokku is a Heroku-like tool that allows you to deploy complex apps by simply pushing with Git.

They start with some of the differences between the Heroku setup and Dokku, mostly that Dokku uses Docker for the deployment and configuration. They then show you how to create a Dokku server on DigitalOcean: setting up the domain, making the application and deploying the app with a push and other datastore plugins.

tagged: heroku dokku digitalocean deploy application tutorial

Link: https://www.sitepoint.com/heroku-alternative-deploy-apps-dokku-digitalocean/

SitePoint PHP Blog:
Setting up PHP 7 Servers with Laravel Forge and DigitalOcean
Jan 07, 2016 @ 17:11:38

The SitePoint PHP blog has another new article from editor Bruno Skvorc showing you how to set up PHP 7 servers in two different ways: one the DigitalOcean platform and the other using the Laravel Forge service.

In this quick guide, we’ll cover two ways to bring a PHP 7 server online on DigitalOcean – a popular VPS provider. We’ll use two approaches, the latter of which will be applicable to any Ubuntu installation whereas the former will only work on DigitalOcean.

He starts with a brief description of what Laravel Forge is for those not familiar with it and how to use it to set up your new server instance. Screenshots of the interface are included showing the setup of the instance, backups, configuration of the server and how to link it to a repository. Then he gets into the more "manual" installation, working with a simple low-tier DigitalOcean droplet to secure and configure it with similar kinds of features: PHP 7 installed and working, Nginx and a fresh checkout of the repository.

tagged: php7 server tutorial setup laravelforge digitalocean deploy repository

Link: http://www.sitepoint.com/setting-up-php-7-servers-with-laravel-forge-and-digitalocean/

DigitalOcean Community Blog:
How To Deploy a Basic PHP Application using Ansible, Part2
Jun 26, 2015 @ 14:53:33

Digital Ocean has continued their series about deploying "advanced PHP applications" on an Ubuntu instance via Ansible in part two of the series. If you missed the first part of the series, you can check it out here.

This tutorial is the second in a series about deploying PHP applications using Ansible on Ubuntu 14.04. The first tutorial covers the basic steps for deploying an application, and is a starting point for the steps outlined in this tutorial.

In this tutorial we will cover setting up SSH keys to support code deployment/publishing tools, configuring the system firewall, provisioning and configuring the database (including the password!), and setting up task schedulers (crons) and queue daemons. The goal at the end of this tutorial is for you to have a fully working PHP application server with the aforementioned advanced configuration.

You'll need to finish the first tutorial if you want to follow along here. They pick up where they left off to finish the whole process, starting with a switch to a more advanced example repository. They modify the Ansible configuration and run the playbook to update the host. From there they break things down into several more steps:

  • Setting up SSH Keys for Deployment
  • Configuring the Firewall
  • Installing the MySQL Packages
  • Setting up the MySQL Database
  • Configuring the PHP Application for the Database
  • Migrating the Database
  • Configuring cron Tasks
  • Configuring the Queue Daemon

While a good bit of these steps relate to something Laravel needs (what they use for the sample application), it's still a good overview of the wide range of things you can do with Ansible during deployment.

tagged: deploy ansible digitalocean setup tutorial configure laravel framework part2

Link: https://www.digitalocean.com/community/tutorials/how-to-deploy-an-advanced-php-application-using-ansible-on-ubuntu-14-04

SitePoint PHP Blog:
Deploying PHP apps to DigitalOcean with Dploy.io
Jun 22, 2015 @ 17:35:23

On the SitePoint PHP blog today editor Bruno Skvorc shows you how to deploy your PHP applications with Dploy.io, a service that aims to make deploying and hosting your applications simpler.

In this tutorial, we’ll take a look at how to deploy a PHP application with Dploy, a tool that’s free (and full-featured) for a single application, which makes for a perfect test case on whether or not it’s worth paying for. Before continuing, go ahead and sign up for a free account. Specifically, we’ll deploy a simple app I made on DigitalOcean.

He helps you get a Digital Ocean droplet set up with the necessary requirements, the software you'll need to install and the configuration changes to make. He then moves over to Dploy and shows how to set up a basic configuration through their web control panel. This includes the environment, deployment mode and the branch of the repository to pull from. He also includes instructions for setting the correct permissions on the system and how to start the deployment. He shows screenshots of the resulting status update and how to check to be sure everything's working as expected. He ends the post with a quick look at making deployments following this via the special "[deploy]" tag in the commit message.

tagged: deploy application tutorial dployio service digitalocean

Link: http://www.sitepoint.com/deploying-php-apps-digitalocean-dploy-io/

Scotch.io:
Deploy PHP Apps Easily with Laravel Forge
Jun 18, 2015 @ 13:27:04

The Scotch.io site has a new post that wants to help make your Laravel deployments on Forge a simple thing. Forge is a "frontend" to make deployment on the hosting platform of your choice simpler with features for configuring the server, application deployment and automation (like push to deploy).

Forge is an incredible tool in the family of Laravel products that helps developers focus on developing, not deploying and hosting. I personally use it when deploying Laravel applications and it does make life much easier. Many of the pain points of hosting are taken care of for you so you can get right back to developing. [...] We’ll be diving into how we can deploy a Laravel application to Forge using Digital Ocean and GitHub.

He starts with a brief introduction to how Forge works and cooperates with the Digital Ocean stack to create the server and deploy the application. He answers a few questions about "why should you use Forge" and then gets into the actual setup of the server. He walks you through:

  • Linking the project to a GitHub or BitBucket repository
  • Adding SSH keys to connect to use for connecting to the server
  • Creating a server

He also goes through some of the server management features Forge offers in its dashboard including monitoring services, server tools and basic site management controls. Once everything is set up, he shows how to deploy from the GitHub repository and how to use third-party integrations (like Slack or HipChat) and the use of environment variables.

tagged: tutorial deploy application laravel forge github digitalocean

Link: https://scotch.io/tutorials/deploy-php-apps-easily-with-laravel-forge

NetTuts.com:
Using the Digital Ocean API to Manage Cloud Instances
Jun 05, 2015 @ 16:14:10

In a new tutorial on the NetTuts.com site they show you how to use a Digital Ocean PHP SDK to manage your cloud instances from a PHP-based application.

The Digital Ocean API allows you to manage Droplets and resources in a simple, programmatic way using HTTP requests. All of the functionality that you are familiar with in the Digital Ocean control panel is also available through the API, allowing you to script the complex actions that your situation requires. For this tutorial, we'll integrate developer Antoine Corcy's Digital Ocean V2 PHP API Library into a Yii-based console application.

They walk you through the full process of the setup - getting your access keys, getting the PHP SDK and setting up a component as an interface for the rest of the Yii2 application to use. From there, he shows three examples of the types of commands to can issue:

  • Fetching Droplets
  • Fetching Images
  • Automating Snapshots

Each example comes with the code to implement it and screenshots of both how the same functionality looks in the Digital Ocean control panel and the output of their script.

tagged: digitalocean manage cloud instance sdk tutorial yii2

Link: http://code.tutsplus.com/tutorials/using-the-digital-ocean-api-to-manage-cloud-instances--cms-22864

DigitalOcean Community Blog:
How To Deploy a Basic PHP Application using Ansible on Ubuntu 14.04
May 13, 2015 @ 15:15:16

If you've ever been interested in learning Ansible and how to use it in deploying your PHP applications, you should check out this new tutorial from Stephen Rees-Carter on the DigitalOcean blog. He walks you through the full process for getting the server and application set up and configured just the way you need it (on a Ubuntu server).

This tutorial covers the process of provisioning a basic PHP application using Ansible. The goal at the end of this tutorial is to have your new web server serving a basic PHP application without a single SSH connection or manual command run on the target Droplet. We will be using the Laravel framework as an example PHP application, but these instructions can be easily modified to support other frameworks and applications if you already have your own.

He starts with a list of the things you'll already need installed and things to know including a basic understanding of Ansible and two servers (they use their own Droplets in the examples). From there, they walk you through a seven step process to get the automated deployment up and running:

  • Installing Ansible
  • Installing Required Packages
  • Modifying System Configuration Files
  • Cloning the Git Repository
  • Creating an Application with Composer
  • Updating Environment Variables
  • Configuring Nginx

Some of the steps here are Laravel-specific as mentioned but if you're familiar with the setup of your own application, it's pretty easy to adapt. Each step includes the configuration changes and commands you'll need to complete it.

tagged: deploy ansible digitalocean setup tutorial configure laravel framework

Link: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-basic-php-application-using-ansible-on-ubuntu-14-04


Trending Topics: