### feat: füge Mail-Service-
Desktop CI — Headless Tests & Build / Compose Desktop — Tests (headless) & Build (push) Failing after 58s
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Successful in 5m59s
Build and Publish Docker Images / build-and-push (., backend/services/mail/Dockerfile, mail-service, mail-service) (push) Successful in 5m48s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Successful in 6m2s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Failing after 1m52s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Successful in 1m44s

This commit is contained in:
2026-04-22 23:17:08 +02:00
parent 309834d90c
commit 6b690232ff
10 changed files with 169 additions and 54 deletions
@@ -0,0 +1,34 @@
package at.mocode.mail.service.config
import at.mocode.mail.service.persistence.NennungTable
import jakarta.annotation.PostConstruct
import org.jetbrains.exposed.v1.jdbc.Database
import org.jetbrains.exposed.v1.jdbc.SchemaUtils
import org.jetbrains.exposed.v1.jdbc.transactions.transaction
import org.slf4j.LoggerFactory
import org.springframework.context.annotation.Configuration
import javax.sql.DataSource
/**
* Wires Spring's DataSource into Exposed and ensures the schema exists.
* This replaces the implicit init that previously happened in the polling service.
*/
@Configuration
class ExposedConfiguration(
private val dataSource: DataSource,
) {
private val log = LoggerFactory.getLogger(ExposedConfiguration::class.java)
@PostConstruct
fun connectAndInitSchema() {
// Bind Exposed to Spring's DataSource
Database.connect(dataSource)
// Create required tables if missing (idempotent for H2 and typical RDBMS)
transaction {
SchemaUtils.create(NennungTable)
}
log.info("Exposed connected to DataSource and schema initialized (NennungTable).")
}
}
@@ -14,7 +14,7 @@ spring:
host: ${SPRING_MAIL_HOST:smtp.world4you.com}
port: ${SPRING_MAIL_PORT:587}
username: ${SPRING_MAIL_USERNAME:online-nennen@mo-code.at}
password: ${SPRING_MAIL_PASSWORD:}
password: ${SPRING_MAIL_PASSWORD:Mogi#2reiten}
properties:
mail:
smtp:
@@ -26,9 +26,10 @@ spring:
consul:
host: ${SPRING_CLOUD_CONSUL_HOST:localhost}
port: ${SPRING_CLOUD_CONSUL_PORT:8500}
enabled: ${SPRING_CLOUD_CONSUL_ENABLED:false}
discovery:
enabled: true
register: true
enabled: ${SPRING_CLOUD_CONSUL_DISCOVERY_ENABLED:false}
register: ${SPRING_CLOUD_CONSUL_DISCOVERY_REGISTER:false}
prefer-ip-address: true
health-check-path: /actuator/health
health-check-interval: 10s
@@ -43,7 +44,12 @@ management:
endpoints:
web:
exposure:
include: "health,info,prometheus"
include: health,info,prometheus
endpoint:
health:
show-details: always
probes:
enabled: true
# Feature-Flags
mail: