Skip to content

Commit

Permalink
Update devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
JoepdeJong committed Oct 11, 2023
1 parent aa464a7 commit b255f4f
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 22 deletions.
18 changes: 9 additions & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/java:1" : {"installGradle": "true"}
"ghcr.io/devcontainers/features/java:1": {
"installGradle": "true"
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// This can be used to network with other containers or with the host.
"forwardPorts": [1080, 8081],

"forwardPorts": [
1080,
8081,
8082
],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "java -version",
"postCreateCommand": "gradle bootRun",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "root"
}
}
8 changes: 8 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ services:
POSTGRES_DB: events
POSTGRES_HOST_AUTH_METHOD: trust

adminer:
image: adminer
restart: always
depends_on:
- postgres
ports:
- 8082:8080

mailcatcher:
image: schickling/mailcatcher
restart: on-failure
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"java.compile.nullAnalysis.mode": "automatic"
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "interactive"
}
12 changes: 12 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "bootRun",
"type": "shell",
"command": "gradle bootRun"
}
]
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext {
springBootVersion = '2.5.12'
springBootVersion = '2.5.15'
}
ext['log4j2.version'] = '2.17.2'
repositories {
Expand Down
12 changes: 10 additions & 2 deletions config/application-devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ spring:

jpa:
# Set to false in production to prevent spamming of console
show-sql: true
show-sql: false
hibernate.type: trace
type: trace
database-platform: org.hibernate.dialect.PostgreSQLDialect
generate-ddl: true
hibernate.hb2mddl.auto: create-drop
hibernate.ddl-auto: update

# This setting defines the database creation/update behaviour. Change with caution.
properties.hibernate.default_schema: public
Expand All @@ -41,6 +41,11 @@ spring:
mode: HTML
encoding: UTF-8
content-type: text/html

web:
resources:
static-locations[0]: "file:src/main/resources/static/"
static-locations[1]: "classpath:/static/"

mail:
host: 127.0.0.1
Expand All @@ -61,8 +66,11 @@ spring:
- auth
- profile
- email
- openid
- auth

logging.level.web: DEBUG

# Spring mail
# Database migration automation. Set to false for development

Expand Down
5 changes: 0 additions & 5 deletions config/application.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ wisvch.connect:
wisvch.events:
image.path: http://localhost:8080/events/api/v1/documents/

# CH Payments Configuration
wisvch.payments:
issuerUri: http://localhost:9000/payments
clientUri: http://localhost:8080/events

# CH mollie api key
mollie:
apikey: test
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/ch/wisv/events/core/model/event/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import lombok.AccessLevel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Setter;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;
Expand All @@ -29,6 +30,7 @@
*/
@Entity
@Data
@EqualsAndHashCode(exclude = {"products"})
public class Event {

/**
Expand Down Expand Up @@ -256,8 +258,4 @@ public boolean hasExternalProductUrl() {
public String toString() {
return this.title;
}

public int hashCode() {
return this.id;
}
}

0 comments on commit b255f4f

Please sign in to comment.