fix: update Dockerfile, application properties, and controller mappings for health check and CORS support
All checks were successful
Release and Build Docker Images / release-and-build (push) Successful in 1m38s
All checks were successful
Release and Build Docker Images / release-and-build (push) Successful in 1m38s
This commit is contained in:
@@ -10,8 +10,7 @@ public class WebConfig implements WebMvcConfigurer {
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**")
|
||||
.allowedOrigins("http://localhost:5173", "http://localhost:3000", "http://localhost:8081",
|
||||
"http://localhost:80", "https://todo.almazlar.com") // Typical Vite/React/Docker ports
|
||||
.allowedOrigins("http://localhost:5173", "https://todo.almazlar.com")
|
||||
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
|
||||
.allowedHeaders("*")
|
||||
.allowCredentials(true);
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/version")
|
||||
@RequestMapping("/version")
|
||||
public class VersionController {
|
||||
|
||||
@Value("${APP_VERSION:dev}")
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# backend/src/main/resources/application.properties
|
||||
|
||||
server.port=8082
|
||||
server.servlet.context-path=/api
|
||||
spring.application.name=backend
|
||||
spring.datasource.url=jdbc:postgresql://localhost:5432/tododb
|
||||
spring.datasource.username=postgres
|
||||
spring.datasource.password=postgres
|
||||
|
||||
spring.jpa.hibernate.ddl-auto=update
|
||||
spring.jpa.show-sql=true
|
||||
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
|
||||
management.endpoints.web.exposure.include=health,info,metrics
|
||||
management.endpoint.health.show-details=always
|
||||
Reference in New Issue
Block a user