Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ repositories {
mavenCentral()
}

tasks.register('keymaster', Exec) {
executable 'java'
args '-jar', "keymaster.jar"
workingDir "${projectDir}"
inputs.file("${projectDir}/keymaster.jar")
outputs.dir("${projectDir}")
}


dependencies {
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation('org.springframework.boot:spring-boot-starter-validation')
Expand All @@ -56,7 +65,7 @@ dependencies {
testImplementation 'ognl:ognl'
testImplementation 'com.tngtech.archunit:archunit-junit5-engine:1.2.1'

runtimeOnly 'org.postgresql:postgresql:42.7.1'
runtimeOnly 'com.h2database:h2'
}

tasks.named('test') {
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ services:
build:
context: .
dockerfile: Dockerfile.RoomMate
always_build: true
image: team-propra/roommate:v1
ports:
- "8081:8081"
environment:
- "SPRING_PROFILES_ACTIVE=docker"


keymaster:
Expand Down
35 changes: 32 additions & 3 deletions src/main/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
logging:
level:
ROOT: Warn
ROOT: WARN
org.flywaydb: DEBUG
org.springframework.jdbc: DEBUG
org.hibernate.SQL: DEBUG
spring:
config:
activate:
on-profile: default # Set this to 'docker' when running in Docker

main:
banner-mode: "off"
security:
Expand All @@ -13,9 +20,31 @@ spring:
client-secret: ${CLIENT_SECRET}
scope: read:public_repo




---

spring:
config:
activate:
on-profile: local

datasource:
url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
username: sa
password:
driver-class-name: org.h2.Driver

---

spring:
config:
activate:
on-profile: docker

datasource:
url: jdbc:postgresql://localhost:5432/postgres
url: jdbc:postgresql://postgres:5432
username: user
password: 1234
driver-class-name: org.postgresql.Driver
driver-class-name: org.postgresql.Driver
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
@TestClass
public class MainTest {
@Test
@Disabled // postgres database required so it always fails
@DisplayName("Main can be run")
public void test_1() {
RoomMateApplication.main(new String[]{});
Expand Down