The private API for the project41 application
Before running this project, ensure that you have the following installed on your machine:
- JDK (Java Development Kit) 17 or later: Download JDK
- Maven 3.8.6 or later: Download Maven
- MySQL 8.0.33 or later: Download MySQL
- Clone this repository to your local machine.
- Open a terminal and navigate to the project's backend directory:
cd project41-backend
. - Update the MySQL database connection settings in the
application.properties
file. - Build the backend project using Maven:
mvn clean install
. - Run the backend application in your IDE or with the command:
mvn spring-boot:run
.
The backend server should now be running on http://localhost:8080.
- Log in to Docker Hub
- Copy the desired version of
gameservice
into the root project directory - Build the project:
mvn clean install
- Build the Docker image:
docker build -t project41301/backend .
- Push the Docker image to Docker Hub:
docker push project41301/backend
- Deploy the Docker image on Render
- Verify the Docker image hash with the deployed version
If the database structure has been changed, we will need to take the following steps after deployment:
- Set the
DATASOURCE_STRATEGY
environment variable tocreate
through the Render dashboard - Deploy the latest Docker image (if not deployed automatically by Render)
- Set the
DATASOURCE_STRATEGY
environment variable toupdate
through the Render dashboard - Deploy the latest Docker image (if not deployed automatically by Render)
All unit tests will run automatically upon building the application with Maven. You may add to the suite of tests under the tests folder in the project directory.
This project is licensed under the MIT License.