./gradlew clean build
docker build -t cmsch .
./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
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
You must install:
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'tRun
> Messaging
.Project Settings
> Service accounts
Generate new private key
and download the .json filehu.bme.sch.cmsch.google.service-account-key
property to the contents of the JSON fileFIREBASE_SERVICE_ACCOUNT_KEY
to the contents of the JSON fileProject Settings
> General
Add app
apiKey, projectId, appId, messagingSenderId
and set the FIREBASE_*
properties in .envProject Settings
> Cloud Messaging
and scroll down to Web Push certificates
Generate key pair
. Copy the value from Key pair
column and set VITE_FIREBASE_WEB_PUSH_PUBLIC_KEY
to it.