./gradlew clean bootBuildImage --imageName=<your registry>/cmsch:release
./gradlew bootRun --args='--spring.profiles.include=test,internal'
./gradlew -Dorg.gradle.jvmargs="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.rmi.port=9010 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -XX:+UseSerialGC" clean bootRun --args='--spring.profiles.include=test,internal'
Use your authsch details for docker login. Tag rc
for staging (release candidate) and tag release for release.
docker login harbor.sch.bme.hu
# Release candidate
docker image tag cmsch:latest harbor.sch.bme.hu/org-kir-dev/cmsch:rc
docker image push harbor.sch.bme.hu/org-kir-dev/cmsch:rc
# Release (you can use versions like ':major.minor.build' as well)
docker image tag cmsch:latest harbor.sch.bme.hu/org-kir-dev/cmsch:release
docker image push harbor.sch.bme.hu/org-kir-dev/cmsch:release
- Install Kubectl
- Install Helm
- Create a copy of helm/cmsch/values.yaml and modify the values for your needs; you can delete the properties you don't modify to make the config cleaner
- Select the correct Kubernetes context:
kubectl config use-context <context>
- Run
helm upgrade --install cmsch-<instance name> --values <path-to-your.yaml> ./helm/cmsch
- If you need to change a value, or update the config, run the command above and everything updates automagically
- If you want to delete the instance, run
helm delete cmsch-<instance name>
For development:
docker run --rm -p 8080:80 \
-e AUTHSCH_CLIENT_ID=20_CHARS \
-e AUTHSCH_CLIENT_KEY=80_CHARS \
-e PROFILE_SALT=RANDOM_STRING \
-e SYSADMINS=YOUR_AUTH_SCH_UUID \
cmsch
or from the registry: YOU MIGHT PROBABLY WANT TO START WITH THIS
docker pull harbor.sch.bme.hu/org-kir-dev/cmsch
docker run --rm -p 8080:80 \
-e AUTHSCH_CLIENT_ID=20_CHARS \
-e AUTHSCH_CLIENT_KEY=80_CHARS \
-e PROFILE_SALT=RANDOM_STRING \
-e SYSADMINS=YOUR_AUTH_SCH_UUID \
harbor.sch.bme.hu/org-kir-dev/cmsch
- Api docs: BASE_URL/swagger-ui.html
- Admin UI: BASE_URL/admin/control/basics
- API: BASE_URL/api/... (see swagger for more)
You must install:
- Node v20
- Yarn v1.22.17
- optional: IDEA
Create an application-local.properties file in the src/main/resources/config
folder,
and fill the file with these configurations (using your credentials):
spring.security.oauth2.client.registration.authsch.client-id=<insert the shorter key>
spring.security.oauth2.client.registration.authsch.client-secret=<insert the long key>
spring.security.oauth2.client.registration.google.client-id=<google client-id>
spring.security.oauth2.client.registration.google.client-secret=<google client-secret>
hu.bme.sch.cmsch.startup.sysadmins=<your pekId>
cmsch.website-default-url=http://<your ip>:8080/
hu.bme.sch.cmsch.login.googleAdminAddresses=<your email address>
logging.level.web=DEBUG
Your pekId can be found in the console log of the Spring app when signing in with AuthSCH. The cmsch.website-default-url
property's IP address needs to be either localhost
or the IP of your current device running your Spring app on your network.
Once created, edit the CMSchApplication
Run Configuration's Spring Boot Active Profiles to use (see image down below)
local,test
if you want test data in the database alsolocal
if you don't
- Enable the push notification component on the backend.
- Create a Firebase project and make sure Firebase Cloud Messaging is enabled by navigating to
Run
>Messaging
.
- Navigate to the Firebase Console of your project and open
Project Settings
>Service accounts
- Click on
Generate new private key
and download the .json file - If you are working locally set the value of
hu.bme.sch.cmsch.google.service-account-key
property to the contents of the JSON file - If you are setting up the application inside docker set
FIREBASE_SERVICE_ACCOUNT_KEY
to the contents of the JSON file
- Navigate to the Firebase Console of your project and open
Project Settings
>General
- Scroll down and create a Web App if there is no app already by clicking
Add app
- Find the values of
apiKey, projectId, appId, messagingSenderId
and set theFIREBASE_*
properties in .env - Navigate to
Project Settings
>Cloud Messaging
and scroll down toWeb Push certificates
- If there is no key, click on
Generate key pair
. Copy the value fromKey pair
column and setVITE_FIREBASE_WEB_PUSH_PUBLIC_KEY
to it.