-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Containerize a web app with docker-compose
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: Containerize a Web Application using docker compose | ||
authorName: Sagar Gurung | ||
authorAvatar: https://avatars.githubusercontent.com/u/46086950?v=4 | ||
authorLink: https://github.com/SagarGi | ||
createdAt: Aug 31, 2023 | ||
tags: docker-compose, docker, containerization,yaml | ||
banner: https://raw.githubusercontent.com/DevExpress/testcafe-gh-page-assets/master/src/images/testcafe-ogp-icon.png | ||
--- | ||
|
||
In this blog we will basically be containerizing a web application consisting of `MySQL`, `phpmyadmin`, `frontend` and `backend` as service using docker compose. | ||
> Note: This article does not provide concepts of docker. If you like to know concepts of docker [visit here.](https://blog.jankaritech.com/#/blog/How%20to%20use%20selenium%20in%20docker%3F) | ||
Setting up an application can be a bit hefty if application is dependent to various services when setting up locally. But we can easily configure and containerize the whole application and its services in a single docker compose file and make the whole application running not only in your machine but in whole development environment. | ||
In this blog we will make a basic `docker-compose.yaml` for a simple demo project to make it run through the `yaml` file in your machine. So lets get right into it. | ||
|
||
## Prerequisites | ||
since we will be setting up a whole demo application locally first and also with docker compose file, the followings should be installed into your system before we start. | ||
- [Node.js](https://nodejs.org/en) version 16 or above. | ||
- MYSQL | ||
- [Docker](https://docs.docker.com/engine/install/) | ||
- And [docker compose](https://docs.docker.com/compose/install/) | ||
|
||
> Note: For this blog the whole setup is done in ubuntu 22.04 LTS | ||
## Setting up wep application locally | ||
Before we begin to write and set up the docker compose file, lets set up the demo web application locally in your machine. | ||
I have a web application which has frontend `demo-web` and backend `demo-server` in `github` publicly available. | ||
|
||
1. **Setting up frontend** | ||
|
||
Please follow the following steps to set up the `frontend` in your local machine | ||
2. **Setting up database MYSQL** | ||
3. **Setting up backend** |