MEVN App Full Deployment Walkthrough! - [MongoDB, Express, Vue, Node.js]

Поділитися
Вставка
  • Опубліковано 1 чер 2024
  • The process of deploying a web application can be complicated! In this video, I walk through the entire process of deploying a MEVN (MongoDB, Express, Vue, Node.js) application onto a VPS (Virtual Private Server) and connecting it to a custom domain.
    The application can be seen @ mooncoins.net/
    I used Caddy (caddyserver.com/) to serve the frontend, and PM2 (www.npmjs.com/package/pm2) to manage the backend deployment. I also installed MongoDB from scratch and configured access control to protect the data.
    ---
    Here is a link to the full video on the DesignCourse Channel: • Full Stack Development...
    ---
    Join the Community:
    💬 Discord: / discord
    💻 GitHub: github.com/sidpalas/devops-di...
    🐥 Twitter: / sidpalas
    👨‍💼 LinkedIn: / sid-palas
    🌐 Website: devopsdirective.com
    ---
    Timestamps:
    00:00 - Intro
    00:59 - Process breakdown
    01:39 - Clone the repo
    02:02 - Replace hardcoded strings with ENV variables
    05:20 - Creating DNS Record
    06:04 - Add public SSH key to VPS
    07:05 - Instal MongoDB
    09:15 - Add access control to MongoDB
    12:30 - Copy (rsync) application source to VPS
    14:31 - Instal Yarn
    15:23 - Yarn install dependencies
    15:43 - Build frontend (with yarn build)
    16:22 - Install Caddy 2
    17:51 - Copy frontend files to /var/www/html
    18:16 - Configure UFW firewall
    19:07 - Modify Caddyfile configuration
    21:04 - Test the frontend deployment
    21:32 - Install PM2
    22:38 - Create non-root node user
    23:55 - Configure PM2 and launch backend API
    25:52 - Testing the full app!
    26:27 - Outro
    ---
    Community size at time of posting:
    - Subscribers: 9332
    - Channel Views: 218977
  • Наука та технологія

КОМЕНТАРІ • 23

  • @DevOpsDirective
    @DevOpsDirective  3 роки тому +2

    Whoops, the password is shown @ 24:45 😱
    This is the password for the user which has read/write permissions to the cryptos database. Comment here if you are able to hack the app using this information! (Would make a fun follow up video idea! 😁)
    Edit: Looks like my collaborator may have decommissioned the VPS it was running on 🖥...

  • @overrevvv
    @overrevvv 10 місяців тому

    Thank you for this video, it was really helpful.

  • @dylanalbertazzi
    @dylanalbertazzi 3 роки тому

    The new setup is looking clean!! 👀 🔥

    • @DevOpsDirective
      @DevOpsDirective  3 роки тому

      And this is with me having no idea how to actually use the camera! 😂

  • @nak0_x
    @nak0_x Рік тому

    That was a real big help thanks a looott, your content is very clear, well made... it's suits perfectly for me !!

  • @cavidanbagiri7837
    @cavidanbagiri7837 Рік тому

    just perfect

  • @tejasc400
    @tejasc400 3 роки тому

    Thank you so much

  • @daviidon
    @daviidon Рік тому

    Is it possible to update your server without downtime? Would really like to see that

  • @sailor1204
    @sailor1204 Рік тому

    Thanks for the awesome Video! I'm struggling get my Vue App running on a local network. No extra security needed. Is this possible with this method or is there an easier way to achieve this?

    • @DevOpsDirective
      @DevOpsDirective  Рік тому

      It's always tough to debug in UA-cam comments... If you want to join the channel discord (discord.devopsdirective.com) me or someone in the community might be able to help!

  • @liferc
    @liferc 2 роки тому

    I like ur work. Can you make a video about authentication system with MEVN and JWT. There's not video like this

  • @bibek8284
    @bibek8284 3 роки тому

    Please make same stack inside docker replacing vue with Nextjs with Server side rendering. I am struggling on building nextjs and using caddy server with it.

    • @DevOpsDirective
      @DevOpsDirective  3 роки тому

      Hi Bibek -- I haven't tried out Nextjs yet, it looks interesting! The fact that you can mix server-side rending with client-side rendering and static pages is cool!

    • @bibek8284
      @bibek8284 3 роки тому

      @@DevOpsDirective Please try it out. I am not able to deploy my blog site because of less information on using Caddy and nextjs together. If you want a mockup server side rendered project, I can make it for you.

  • @sivasankarant9195
    @sivasankarant9195 3 роки тому

    But how do you scale this horizontally

    • @DevOpsDirective
      @DevOpsDirective  3 роки тому +1

      You can run multiple instances of the api server with PM2 and have it load balance across them (pm2.keymetrics.io/docs/usage/cluster-mode/)
      You would also likely want to move the DB to a separate server if you really wanted to scale!

    • @sivasankarant9195
      @sivasankarant9195 3 роки тому

      @@DevOpsDirective thank you 😊

  • @livdev8144
    @livdev8144 3 місяці тому

    Are you the brother of Simon Kjær ?

  • @WebDevCody
    @WebDevCody 3 роки тому

    More like deploying the FUN way! `vercel .` is too boring. I got to bookmark this video. There is a ton great info for rolling your own hosting, including security in this tutorial.

    • @DevOpsDirective
      @DevOpsDirective  3 роки тому

      I'm more of a `docker compose up` (or even better `helm upgrade --install`) kind of guy! 😉

  • @twitchizle
    @twitchizle 3 роки тому +1

    What a censor!