./gradlew clean build
docker build -t cmsch . ./gradlew bootRun --args='--spring.profiles.include=test,internal,golyakorte2022' ./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-golyakorte/cmsch:rc
docker image push harbor.sch.bme.hu/org-golyakorte/cmsch:rc
# Release (you can use versions like ':major.minor.build' as well)
docker image tag cmsch:latest harbor.sch.bme.hu/org-golyakorte/cmsch:release
docker image push harbor.sch.bme.hu/org-golyakorte/cmsch:releaseFor 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 \
cmschor from the registry: YOU MIGHT PROBABLY WANT TO START WITH THIS
docker pull harbor.sch.bme.hu/org-golyakorte/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-golyakorte/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=DEBUGYour 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,testif you want test data in the database alsolocalif 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 keyand download the .json file - If you are working locally set the value of
hu.bme.sch.cmsch.google.service-account-keyproperty to the contents of the JSON file - If you are setting up the application inside docker set
FIREBASE_SERVICE_ACCOUNT_KEYto 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, messagingSenderIdand set theFIREBASE_*properties in .env - Navigate to
Project Settings>Cloud Messagingand scroll down toWeb Push certificates - If there is no key, click on
Generate key pair. Copy the value fromKey paircolumn and setVITE_FIREBASE_WEB_PUSH_PUBLIC_KEYto it.