-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme.md.txt
75 lines (40 loc) · 1.94 KB
/
readme.md.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Here's a sample `README.md` file for your project, with instructions on how to set it up and run it using Docker:
---
# Shopme Project
This project contains the **Shopme Frontend** and **Shopme Backend** services, which are dockerized and configured to run with MySQL as the database. The frontend is accessible on port 80, and the backend is accessible on port 8080.
## Prerequisites
- **Docker** and **Docker Compose** should be installed on your system.
## Getting Started
1. **Clone the Repository**
git clone https://github.com/yourusername/shopme-project.git
cd shopme-project
2. **Set Up Environment Variables**
Ensure you have the following environment variables set in your Docker Compose file, particularly for AWS S3 configuration if required for file storage.
3. **Build and Start the Containers**
Run the following command to build and start all services (MySQL, backend, and frontend):
docker-compose up -d
- This command will:
- Start MySQL on port 3307 (mapped to 3306 inside the container).
- Start the Shopme backend on port 8080.
- Start the Shopme frontend on port 80.
4. **Check Container Status**
To verify if the containers are running, use:
docker ps
5. **Access the Application**
- Shopme Frontend**: http://localhost
- Shopme Backend**: http://localhost:8080/ShopmeAdmin
## Additional Commands
- **Stopping Containers**
To stop the containers without removing them:
docker-compose stop
- **Rebuilding Containers**
If you've made changes to the code and want to rebuild the images:
docker-compose up --build -d
- **Removing Containers**
To stop and remove the containers:
docker-compose down
## Troubleshooting
- Ensure the ports (80 and 8080) are not occupied by other services.
- Confirm that Docker Compose has access to create the necessary volumes for MySQL data persistence.
---
Feel free to modify the repository URL and any specific instructions as needed!