Follow these steps to build and run the application using Docker.
Make sure you have Docker and Docker Compose installed on your computer.
-
Clone the Repository
git clone <repo_code>
-
Initialize the Database Create the database by running the
init.sqlscript located in thedatabasefolder. -
Create Configuration File Create an
application.propertiesfile under thebackend/src/main/resourcesdirectory.
-
Navigate to Project Root Change your directory to the project's root folder:
cd /path/to/bounswe2025group5 -
Build and Run Services Use Docker Compose to build the images and start the frontend and backend services.
docker-compose up --build
-
Verify Containers Check if the containers are running correctly.
docker ps -as
-
Access the Application Open your browser and navigate to:
http://localhost:3000
The URL at frontend is "https://waste-less.alibartukonca.org" . If you wish to run the backend on your local machine, you must change the configuration in the frontend code to send API requests to http://localhost:8080.
To view the logs for a specific running container:
docker-compose logs <container_name_or_id>The fields you need to put is :
- spring.application.name=CMPE451
- spring.datasource.url=<your_local_db_url>
- spring.datasource.username=
- spring.datasource.password=
- spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
- spring.servlet.multipart.max-file-size=10MB
- spring.servlet.multipart.max-request-size=10MB
- spring.web.resources.static-locations=
- digitalocean.spaces.access-key=
- digitalocean.spaces.secret-key=
- digitalocean.spaces.endpoint=
- digitalocean.spaces.bucket-name=
- digitalocean.spaces.region=
- digitalocean.spaces.photo-folder=
- digitalocean.spaces.post-photo-folder=
# Hibernate properties
- spring.jpa.hibernate.ddl-auto=validate
- spring.jpa.show-sql=true
- spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect