Skip to content

Latest commit

 

History

History
59 lines (38 loc) · 1.37 KB

README.md

File metadata and controls

59 lines (38 loc) · 1.37 KB

Dockerized Application

This project is a web application consisting of a frontend, backend, and a MySQL database, all containerized using Docker and managed with Docker Compose.

Prerequisites

Getting Started

  1. Clone the repository:

    git clone <repository-url>
    cd <repository-name>
  2. Build and start the containers:

    docker-compose up --build
  3. Access the application:

Services

  • frontend: React app build vite Node.js and served via Nginx.
  • backend: Node.js/Express application.
  • mysql: MySQL database with persistent storage.

Database Configuration

  • Host: mysql
  • Port: 3306
  • Database: myappdb
  • User: myuser
  • Password: mypassword

Volumes

  • mysql-data: Persists MySQL data between container restarts.

Notes

  • Ensure the init.sql script is present in the root directory to initialize the database on the first run.
  • Environment variables are set in the docker-compose.yml file.

Stopping the Application

To stop the application and remove containers, networks, and volumes, run:

docker-compose down