Git Product home page Git Product logo

laravel-deploy's Introduction

Angular and Laravel Application Deployment on Digital Ocean Droplet

Overview

This guide outlines the steps to deploy an Angular frontend and a Laravel backend application on a Digital Ocean droplet. By following these instructions, you'll be able to set up and configure your server to host both the frontend and backend components of your application.

Prerequisites

  • A Digital Ocean account
  • Basic understanding of Angular and Laravel development
  • Familiarity with Linux server administration and command line interface

Steps

  1. Create a Digital Ocean Droplet

    • Log in to your Digital Ocean account and create a new droplet.
    • Choose the desired operating system (e.g., Ubuntu) and configuration for your droplet.
  2. SSH Into Your Droplet

    • Once your droplet is created, SSH into it using the provided IP address and your SSH key.
  3. Install Required Software

    • Update the package list: sudo apt update
    • Install Nginx web server: sudo apt install nginx
    • Install PHP and required extensions for Laravel: sudo apt install php php-cli php-fpm php-mysql php-json php-mbstring php-xml php-zip unzip
  4. Configure Nginx

    • Configure Nginx to serve your Angular frontend and Laravel backend applications. You'll need to create server blocks for each application.
  5. Install Composer (for Laravel)

    • Install Composer, a PHP dependency manager, by following the instructions on the Composer website.
  6. Deploy Laravel Backend

    • Clone your Laravel project repository onto the server.
    • Install dependencies using Composer: composer install
    • Set up environment variables and configure your .env file.
    • Run database migrations and seeders if necessary: php artisan migrate --seed
    • Configure Nginx to serve your Laravel application.
  7. Deploy Angular Frontend

    • Build your Angular project locally: ng build --prod
    • Transfer the built files to your server using SCP or another file transfer method.
    • Configure Nginx to serve your Angular application.
  8. Secure Your Server

    • Configure firewall rules to allow only necessary incoming traffic.
    • Enable HTTPS by obtaining an SSL certificate and configuring Nginx to use it.
  9. Test Your Deployment

    • Access your server's IP address in a web browser to verify that both the Angular frontend and Laravel backend are functioning correctly.
  10. Monitor and Maintain

    • Set up monitoring and logging to keep track of server performance and errors.
    • Regularly update your server's software to ensure security and stability.

laravel-deploy's People

Contributors

tobimadehin avatar

Stargazers

Micheal Newton avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.