# Build And Deploy Application Using S2I

1. Click **Add+** menu.

   ![Add application](https://4096465133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3i2iCO0U9uw1JFkKW85%2Fuploads%2Fgit-blob-dd1f57c097fbc60a9209110184ece133b4b893f0%2Fdeploy-10.png?alt=media)
2. Select **Import from Git** in the Git Repository panel.

   ![Import from Git](https://4096465133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3i2iCO0U9uw1JFkKW85%2Fuploads%2Fgit-blob-1afcfe988eef8d4cfec67ddf5b30b6fb63f0431f%2Fdeploy-11.png?alt=media)
3. Enter **Git Repo URL** as `https://github.com/audomsak/quarkus-todo-app` then click **Show advanced Git options** link.

   ![Import from Git](https://4096465133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3i2iCO0U9uw1JFkKW85%2Fuploads%2Fgit-blob-2494b5a31ea51a73df8a68d2af55f2b01ec40c83%2Fdeploy-12.png?alt=media)
4. Enter `/todo` to the **Context dir** (this is because our application project is in the `todo` directory)

   ![Import from Git](https://4096465133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3i2iCO0U9uw1JFkKW85%2Fuploads%2Fgit-blob-29fc44e5e67501d8ab07018c6165de60fc81f050%2Fdeploy-13.png?alt=media)
5. Scroll down and delete the **Application name** value. Then click **Create** button.

   ![Import from Git](https://4096465133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3i2iCO0U9uw1JFkKW85%2Fuploads%2Fgit-blob-d59068ac641530be55fd3e3d9fcda478cb63ed7b%2Fdeploy-14.png?alt=media)
6. Click on the **quarkus-todo-app** node, then go to the **Resources** tab in the panel on the right and then click on **View logs** link to see build logs.

   ![View build logs](https://4096465133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3i2iCO0U9uw1JFkKW85%2Fuploads%2Fgit-blob-f8d1dd3d224eb9a394a053ed1999a58f3d8631fd%2Fdeploy-15.png?alt=media)
7. You should be able to see application and container image builds logs.

   ![Build logs](https://4096465133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3i2iCO0U9uw1JFkKW85%2Fuploads%2Fgit-blob-ab249b2659037700e2468960b9e06e1059869f87%2Fdeploy-16.png?alt=media)
8. Wait until the build changes to `Completed`. Then select **Topology** menu to go back to the topology view.

   ![Build logs](https://4096465133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3i2iCO0U9uw1JFkKW85%2Fuploads%2Fgit-blob-2016ccb9d9246183b37e39cf23441e9bb38fa5fa%2Fdeploy-17.png?alt=media)
9. You should be able to see the **quarkus-todo-app** node is surrounded by blue ring (it means the Pod is up and running). Click on the arrow icon to open the application URL.

   ![Open application URL](https://4096465133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3i2iCO0U9uw1JFkKW85%2Fuploads%2Fgit-blob-e03be7c28ee9865a8bbabca4cfefff1ea005deec%2Fdeploy-18.png?alt=media)
10. Application homepage shoud show up without any todo tasks. This is because the application is currently not able to connect to PostgreSQL database.

    ![Application homepage](https://4096465133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3i2iCO0U9uw1JFkKW85%2Fuploads%2Fgit-blob-760b88dab10812580189f9c194f8de1ecc98a882%2Fdeploy-19.png?alt=media)
