# Configure
# Firebase Cloud Messaging
SenSeeAct uses Firebase Cloud Messaging (FCM) to send push messages at database events. These can be received for example by mobile apps. You need to set up the Firebase Admin SDK in your Google account.
More info:
https://firebase.google.com/docs/cloud-messaging (opens new window)
Main FCM documentation. Includes details about setting up FCM in a (mobile) client app.https://firebase.google.com/docs/cloud-messaging/server#firebase-admin-sdk-for-fcm (opens new window)
Documentation about setting up Firebase Admin SDK.
This is what you need to do to set up the Firebase Admin SDK. First create a project:
- Open the Firebase console:
https://console.firebase.google.com/ (opens new window) - Click Create a project (if this is your first Firebase project) or Add project (if you already have a project).
- Enter your project name, for example “SenSeeAct”.
- Check the checkboxes to accept the terms (not shown if you already did that before).
- Click Continue.
- The next step is about Google Analytics. This is forbidden in several European countries due to GDPR violations. Therefore we recommend to disable it.
- Click Create project.
- Your project is being created. When ready, click Continue.
Now you get to your project overview. We can continue to set up the Firebase Admin SDK.
- At the top of the side bar, click the settings icon and choose Project settings.
- Select the tab Service accounts.
- Click Create service account.
- Click Generate new private key.
- Your private key is downloaded as a
.json
file. These are yourGOOGLE_APPLICATION_CREDENTIALS
. Keep it in a safe location. You will not be able to download it again.
# gradle.properties
You need to create the configuration file gradle.properties
, where you will
enter some secret keys and passwords, which you can generate with the
key generator.
Open this folder:
<GITDIR>\senseeact\ExampleSenSeeActService
Copy your
.json
file withGOOGLE_APPLICATION_CREDENTIALS
(see Firebase Cloud Messaging) to:
<GITDIR>\senseeact\ExampleSenSeeActService\google-application-credentials.json
Copy
gradle.sample.properties
togradle.properties
.Open
gradle.properties
in your text editor.Check the following runtime properties:
ssaconfigMysqlRootPassword
:
Choose a password for the MySQL root user.ssaconfigJwtSecretKey
,
ssaconfigSecretSalt
:
Enter a 256 bit Base64 key. You can generate it with the key generator with:> .\keygenerator -t base64
ssaconfigAdminEmail
,
ssaconfigAdminPassword
:
Enter an email address and password for the admin user to log in to SenSeeAct.ssaconfigMail*
:
If you don’t have access to a mail server from your workstation, then you can just leave this as is. Otherwise fill in at leastssaconfigMailHost
andssaconfigMailFrom
. Depending on the mail server requirements you can change the other properties too.
Check the following deployment properties:
dockerTomcatUser
,
dockerTomcatPassword
:
Choose a username and password to log in to the Tomcat manager.dockerLogDir
:
Enter the path to a directory on your computer where the log files should be written. Use/
instead of\
.
The files google-application-credentials.json
and gradle.properties
are in
the .gitignore
list. They should never be committed to Git as they contain
secrets.
Keep a copy of your gradle.properties
in a safe place, so you can recover it
when needed.