This project is a web application consisting of a frontend, backend, and a MySQL database, all containerized using Docker and managed with Docker Compose.
-
Clone the repository:
git clone <repository-url> cd <repository-name>
-
Build and start the containers:
docker-compose up --build
-
Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
- frontend: React app build vite Node.js and served via Nginx.
- backend: Node.js/Express application.
- mysql: MySQL database with persistent storage.
- Host:
mysql
- Port:
3306
- Database:
myappdb
- User:
myuser
- Password:
mypassword
mysql-data
: Persists MySQL data between container restarts.
- 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.
To stop the application and remove containers, networks, and volumes, run:
docker-compose down