WEBVTT

00:00.000 --> 00:05.000
Introduction to DevOps Basics

00:05.000 --> 00:11.000
In this video, we will understand the basics of DevOps and why applications need to be deployed online.

00:11.000 --> 00:17.000
Use Git and GitHub to manage versions, track changes, and collaborate on code.

00:17.000 --> 00:22.000
Deploy a web application using a modern hosting platform like Versel.

00:22.000 --> 00:29.000
Publish your project online by connecting Git Hub with a hosting platform.

00:29.000 --> 00:34.000
Until now, we built our Student Stationary app on our own computers.

00:34.000 --> 00:37.000
But what if we want others to use it online?

00:37.000 --> 00:39.000
This is where DevOps begins.

00:39.000 --> 00:46.000
DevOps combines development and operations, helping developers to deploy applications smoothly.

00:46.000 --> 00:50.000
First, we open the browser and type gitHub.com.

00:50.000 --> 00:54.000
On the homepage, we sign up using our Google account.

00:54.000 --> 00:59.000
After completing the sign-up process, our GitHub dashboard appears.

00:59.000 --> 01:02.000
Next, we create a new repository.

01:02.000 --> 01:11.000
We enter a repository name, add a brief description, select the visibility as public, and then click on Create Repository.

01:11.000 --> 01:20.000
GitHub now displays the repository page, and we copy the repository link for future use.

01:20.000 --> 01:23.000
Now, we switch back to Visual Studio Code.

01:23.000 --> 01:26.000
In the terminal, we type git init.

01:26.000 --> 01:30.000
This command initializes git in our project folder.

01:30.000 --> 01:39.000
Then, we type git add dot, which stages all our project files and prepares them for the next step.

01:39.000 --> 01:46.000
After that, we type git commit-m. This saves the current version of our project with a message.

01:46.000 --> 01:54.000
We also use guide branch to view or create branches, which help us manage different features separately.

01:54.000 --> 02:03.000
Next, we link our local project to gitHub by typing git remote add origin, followed by the repository link we copied earlier.

02:03.000 --> 02:09.000
Finally, we upload our project using git push.

02:09.000 --> 02:12.000
We redirect to page gitHub.

02:12.000 --> 02:15.000
At this point, gitHub asks for authorization.

02:15.000 --> 02:22.000
We sign in and grant permission, and the project is successfully pushed to gitHub.

02:22.000 --> 02:28.000
To confirm, we return to the gitHub homepage and open our stationary application repository.

02:28.000 --> 02:39.000
Here, we can see all our project files and the commit history uploaded correctly.

02:39.000 --> 02:44.000
Now that everything is set up locally, let's deploy our application online.

02:44.000 --> 02:47.000
First, we open the browser and go to railway.com.

02:47.000 --> 02:55.000
Here, we sign in using gitHub, where we already pushed our website code.

02:55.000 --> 03:00.000
After signing in, we click new, then choose empty service.

03:00.000 --> 03:02.000
Next, we create our database.

03:02.000 --> 03:12.000
We select add database, choose mysql, and railway automatically generates a new database for our project.

03:12.000 --> 03:16.000
Once the database is created, we go to the variable section.

03:16.000 --> 03:20.000
Now we head to gitHub and create a new repository for our project.

03:20.000 --> 03:28.000
From our GitHub dashboard, we select the repository named stationary app.

03:28.000 --> 03:36.000
Inside the stationary app repository settings, we add our root backend folder so railway can detect our server code.

03:36.000 --> 03:42.000
Then we add all the required environment variables from our database into our backend configuration.

03:42.000 --> 03:49.000
After adding the variables, we click deploy to start the deployment process.

03:49.000 --> 03:54.000
Next, we move to the settings tab and generate a domain for our backend.

03:54.000 --> 03:57.000
We enter the port number used in our backend.

03:57.000 --> 04:03.000
We copy this domain and paste it into our front end code.

04:03.000 --> 04:08.000
Replacing the old localhost URL.

04:08.000 --> 04:15.000
Now we return to railway and open our project.

04:15.000 --> 04:18.000
We check the deployment status.

04:18.000 --> 04:20.000
It shows the build is in progress.

04:20.000 --> 04:30.000
We open the build logs and then the display logs to monitor the progress.

04:30.000 --> 04:37.000
In the details section, we can see the message, deployment successful.

04:37.000 --> 04:47.000
Finally, we copy the generated HTTP link, paste it into the browser, and that our website is now live and published online.

