- Docker compose (download docker desktop should include docker-compose)
- Gradle
- Java 11
- Start up database, and create DATABASE 'API'. This is because SQL SERVER cannot create database on startup.
- Recommend using Azure Data Studio
- Login with connection details as follows:
- Connection Type: Microsoft SQL Server
- Server: 127.0.0.1,1433
- Authentication: SQL Login
- Username: sa
- Password: Password123@
- Database: Default
- Server group: Default
docker-compose -f src/main/docker/mssql.yml up -d
-
Start up application
- CLI:
- windows :
/gradlew.bat bootRun
- unix :
./gradlew bootRun
(In case of Permission Denied, runchmod +x gradlew
)
- windows :
- CLI:
-
Debug using Intellij
- Ensure project loaded as gradle project
- Ensure gradle is using
gradle-wrapper.properties
to execute tasks - Run application / gradle tasks
-
Shut down database while keeping data
docker-compose -f src/main/docker/mssql.yml stop
- Start stopped database
docker-compose -f src/main/docker/mssql.yml start
- Shut down and clean up database
docker-compose -f src/main/docker/mssql.yml down
Deployment checklist :
- Passed CI
- Deployable changes merged
- Update db credentials in application.properties
- Execute bootJar gradle task
- Copy file to target host
- Run file with
java -jar xxxx.jar
in cmd if you wish to test only - Run file with
javaw -jar xxxx.jar
in cmd if you wish to deploy and run as servlet