Skip to content
Snippets Groups Projects
Commit 77c42838 authored by Otto Visser's avatar Otto Visser
Browse files

Merge branch 'update-project-files' into 'development'

Update project documentation to application.yaml

See merge request !263
parents 7f5ffed1 06a12b18
Branches
Tags
3 merge requests!364Release to master,!360Release 1.2.0,!263Update project documentation to application.yaml
......@@ -14,6 +14,7 @@ target/
*.iml
*.ipr
*.iws
stale_outputs_checked
# Eclipse
.classpath
......@@ -21,6 +22,9 @@ target/
.settings/
.springBeans
# Properties files
application.yaml
application.properties
log4j.properties
sentry.properties
......@@ -33,4 +37,3 @@ sentry.properties
# zsh autocompletion
.gradletasknamecache
application.yaml
......@@ -24,7 +24,7 @@ In order to have the project setup properly for development a few steps need to
These steps assume you have already cloned the project (`git clone git@gitlab.ewi.tudelft.nl:eip/labrador/queue.git`)
1. First, the config file should be moved from the template into the actual properties file by executing
`cp src/main/resources/application.properties.template src/main/resources/application.properties`
`cp src/main/resources/application.yaml.template src/main/resources/application.yaml`
from the root directory of the project.
2. Install [IntelliJ IDEA Professional](https://www.jetbrains.com/idea/) ([free for students](https://www.jetbrains.com/student/))
3. [Import project from Gradle model](https://www.jetbrains.com/idea/help/importing-project-from-gradle-model.html)
......@@ -245,7 +245,7 @@ This server is managed by the developers of the CSE Teaching Team (eip-ewi@tudel
### Error logging
All exceptions in the production environment are logged to our [self-hosted Sentry instance](https://sentry.ewi.tudelft.nl).
Access to Sentry can be requested via the server maintainers.
In order to send the logs to the Sentry instance you need to create a properties file called `sentry.properties` next to the `application.properties` file.
In order to send the logs to the Sentry instance you need to create a properties file called `sentry.properties` next to the `application.yaml` file.
This file should contain the following (exact URL can be found in the Sentry project):
```
......
......@@ -12,7 +12,7 @@ In order to have the project setup properly for development a few steps need to
1. First the config file should be moved from the template into the actual properties file
by executing `cp src/main/resources/application.properties.template src/main/resources/application.properties`
by executing `cp src/main/resources/application.yaml.template src/main/resources/application.yaml`
from the root directory of the project.
1. Follow these [instructions](https://gitlab.ewi.tudelft.nl/eip/labrador/queue/blob/development/Contributing.md#submitting-your-changes)
to submit your work
......@@ -41,23 +41,23 @@ The `deploy/` directory contains an Ansible playbook that can be used to provisi
- an nginx site config (`default`) with an upstream for tomcat on port 8080 together with config for a letsencrypt generated SSL certificate.
- a SystemD configuration (`queue.service`) that runs the jar at `/var/www/queue/queue-0.0.1-SNAPSHOT.jar` as root on startup and logs to `/var/log/queue.log`.
- an ansible config that installs Oracle java 8, nginx, postgres, haveged, the SystemD job, the jar, and starts the services.
- an `application.properties` file with application-specific configuration, such as the database settings.
- an `application.yaml` file with application-specific configuration, such as the database settings.
To run the playbook, first replace the hostname and your SSH key in `deploy/hosts`, then run `./deploy/run.sh`.
Note that the current `application.properties` contains `spring.jpa.hibernate.ddl-auto=create` which will drop and create the database upon reboot!
Note that the current `application.yaml` contains `spring.jpa.hibernate.ddl-auto=create` which will drop and create the database upon reboot!
## Configuration
See `application.properties`. Chrome does not yet fully support the Web Push API and uses GCM to handle sending and delivery of push messages. To use the GCM API you need a GCM API key. [This](https://developers.google.com/web/updates/2015/03/push-notifications-on-the-open-web#make-a-project-on-the-google-developer-console) page explains how to obtain one.
See `application.yaml`. Chrome does not yet fully support the Web Push API and uses GCM to handle sending and delivery of push messages. To use the GCM API you need a GCM API key. [This](https://developers.google.com/web/updates/2015/03/push-notifications-on-the-open-web#make-a-project-on-the-google-developer-console) page explains how to obtain one.
You can place an `application.properties` on the classpath which overrides the `application.properties` in the jar itself.
You can place an `application.yaml` on the classpath which overrides the `application.yaml` in the jar itself.
> Nowadays, Chrome supports VAPID (Voluntary Application Identification) for Web Push API and it is no longer necessary to obtain an API key. The Web Push library should be updated to the latest version that I'm maintaining at https://github.com/MartijnDwars/web-push. For VAPID, we need to generate yet another keypair..
### Environments
The system distinguishes two profiles: `development` and `production`. Use the `application.properties` file to set the active profile. The active profile has the following impact:
The system distinguishes two profiles: `development` and `production`. Use the `application.yaml` file to set the active profile. The active profile has the following impact:
- The `DatabaseLoader`, which loads the database with dummy data, is only run if the `development` profile is active.
- The `error.html` page only shows stack traces if the `development` profile is active.
......
......@@ -17,7 +17,7 @@
#
# Default application properties. These can be overridden at run time from an
# application.properties file in the same directory as the executable jar.
# application.yaml file in the same directory as the executable jar.
log4j.rootCategory=INFO, CONSOLE
......
......@@ -17,7 +17,7 @@
#
# Default application properties. These can be overridden at run time from an
# application.properties file in the same directory as the executable jar.
# application.yml file in the same directory as the executable jar.
spring:
profiles:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment