# Deployments


Overview

Devpilot makes deployments of applications seamless with its flexible yet powerful deplyment process. An app can be configured to automatically deploy when new udpates are pushed to source control such as Github. You can also deploy directly from your local machine.

Configuration

Configuring an app for deployment requires that your provide the following information:
  • App Name: This automatically takes the name of the App you are configuring.
  • Workspace Server: This is where you specify which Server you want the app to be deployed to.
  • Project Path: This specifies the path on your server to you want the project to be stored. This must be the full path to the directory. If the path specified does not exist, it will be automatically created.
  • Retained Deployment: This tells Devpilot the number of deployments you would like to keep on your server.
  • Source Provider: This specifies where the update to be deployed would be gotten from.
  • Deploy when code is pushed: If you want updates pushed to your Source Provide, i.e. version control systems like Github. to be deployed automatically, then select Yes.
  • Repository: This is usually the version control repostory of your app.
  • Branch: The branch on the repository you want to deploy by default.
Devpilot automatically deletes old deployments from your server, so you don`t need to worry about wastage of space.

Deployment Structure

The stucture of the deployment may vary based on the platform of your Project, but it should look like:

  • current: This is a symlink to the active deployment.
  • deployments: This directory contains all deployments.
  • .env: The .env file in your project would be exported here if it exists in your app. If no .env file exists in your project, it would be automatically created when you save the .env via Devpilot and linked to your project.
  • storage: The storage folder holds files that are not meant to change with each deployment. In Laravel, the storage folder could contain files deployed by users, so it would be a disaster if that folder is overwritten upon deployment. This folder is exported from your app and linked via a symlink. New changes to this folder would not be deployed.

Deployment Lifecycle

Once a deployment is initiated, Devpilot performs the following actions on your server:

  • Create a new directory to in the deployments directory.
  • Clone the source code form the Source Provider and checks out to the specified commit when necessary.
  • Executes all activePre Deployment hooks available.
  • Export and link the storage directory to your app.
  • Export and link the .env file to your app.
  • Executes all activePost Deployment hooks available.
  • Activate the deployment and make it live.
Devpilot only makes a deplyment live if no errors occurred during the deployment process. This ensures that there is no downtime during deployment.

Deploying via Terminal

Once your app has been configured for deployment, you can deploy your app directory from your terminal locally. For Laravel projects, its as easy as running php artisan deploy.

Found Something Wrong?

Have you found something in the documentation that is confusing or incorrect? Devpilot's documentation is completely open source! Please consider submitting a pull request on GitHub.