Code Monkey home page Code Monkey logo

chrispeterjeyaraj / multi-container-web-application-starterkit Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 462 KB

Build scalable web applications with Docker, Golang, React, and MongoDB.

Home Page: https://github.com/chrispeterjeyaraj/multi-container-web-application-boilerplate/README.md

License: MIT License

Dockerfile 12.05% Go 28.31% HTML 16.00% JavaScript 35.51% SCSS 5.67% CSS 2.46%
containerization containers docker docker-compose go multicontainer nodejs react

multi-container-web-application-starterkit's Introduction

Multi-Container Web Application with Docker

This repository contains a multi-container web application built using Docker, with separate containers for the server, UI, and MongoDB for data storage. The server-side code is written in Golang, and the user interface is developed using React. This setup allows you to easily deploy and manage the various components of your web application as isolated containers.

Go Node Build CI Docker CI

Features

  • Server Container (Golang): The server-side code is written in Golang, providing a fast and efficient backend for your application. It handles data processing and communication with the MongoDB container.

  • UI Container (React): The user interface is built using React, a popular JavaScript library for creating dynamic and responsive web applications. The UI container serves as the frontend of your application.

  • MongoDB Container: MongoDB is used as the database for storing and retrieving data. The MongoDB container ensures data persistence and can be easily configured to suit your application's needs.

  • Docker Compose: The docker-compose.yml file is included to orchestrate and manage the deployment of these containers. Docker Compose simplifies the process of starting and connecting multiple containers.

Getting Started

To get started with this multi-container web application, follow these steps:

  1. Clone the Repository: Clone this repository to your local machine using git clone.

  2. Set Up Environment Variables: Create a .env file in the project root directory and configure environment variables such as database connection settings, server configurations, and any secret keys. For initial setup, i have .env file already. But you can go ahead and make changes as per your requirement.

  3. Build and Start Containers: Use Docker Compose to build and start the containers defined in the docker-compose.yml file. Run the following command:

    docker-compose up --build

    This command will start the server, UI, and MongoDB containers.

  4. Access the Application: Once the containers are up and running, you can access the web application by opening your browser and navigating to http://localhost:3000.

  5. Customize and Extend: Customize the server and UI code to suit your project's requirements. You can modify the Golang server code in the server/ directory and the React UI code in the ui/ directory.

  6. Scaling and Deployment: Docker Compose makes it easy to scale your application and deploy it to various environments. You can configure additional settings for production, staging, or development environments as needed.

Contributing

We welcome contributions to this project. If you find a bug, have a feature request, or want to contribute code, please open an issue or submit a pull request. Check out our Contribution Guidelines for more details.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Thank you for choosing our multi-container web application template. I hope this setup simplifies the development and deployment of your server and UI components, along with MongoDB as your data store. If you have any questions or need assistance, feel free to reach out. Happy coding!

Application URL's (will change as per declaration in docker compose)

api1 -> http://localhost:4000 [non cors]
api2 -> http://localhost:4545 [cors] [use with web application]
mongo express -> http://localhost:8081
UI -> http://localhost:3000

multi-container-web-application-starterkit's People

Contributors

chrispeterjeyaraj avatar

Stargazers

 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.