Compare commits

...

2 Commits

Author SHA1 Message Date
b8b0a4bf30 Remove environment variable defaults and align with docker-compose
All checks were successful
sample gradle build and test / tag (push) Successful in 7s
sample gradle build and test / build_tag_push (push) Successful in 2m28s
sample gradle build and test / Sync All Forks (push) Successful in 11s
- Remove default values from database environment variables
- Use POSTGRES_USERNAME/PASSWORD to match docker-compose.yaml
- Use DB_URL without default to ensure explicit configuration
2026-01-23 21:22:16 +05:30
c0ae476beb Configure PostgreSQL database settings for test and production profiles
- Add PostgreSQL datasource configuration for test and prod profiles
- Use environment-specific database URL, username, and password variables
- Set hibernate.ddl-auto=update for both profiles
- Enable SQL logging in test, disable in production
- Replace H2 in-memory database with PostgreSQL for consistency
2026-01-23 21:16:56 +05:30
3 changed files with 22 additions and 22 deletions

View File

@ -1,16 +0,0 @@
package com.hithomelabs.CFTunnels.Controllers;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class HomeController implements ErrorController {
private static final String ERROR_PATH = "/error";
}

View File

@ -1 +1,12 @@
api.baseUrl=https://cftunnels.hithomelabs.com api.baseUrl=https://cftunnels.hithomelabs.com
# Production Database Configuration
spring.datasource.url=${DB_URL}
spring.datasource.username=${POSTGRES_USERNAME}
spring.datasource.password=${POSTGRES_PASSWORD}
spring.datasource.driver-class-name=org.postgresql.Driver
# JPA Configuration
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=false
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect

View File

@ -1,7 +1,12 @@
api.baseUrl=https://testcf.hithomelabs.com api.baseUrl=https://testcf.hithomelabs.com
spring.datasource.url: jdbc:h2:mem:testdb # Test Database Configuration - Same as Production
spring.datasource.driver-class-name: org.h2.Driver spring.datasource.url=${DB_URL}
spring.datasource.username: sa spring.datasource.username=${POSTGRES_USERNAME}
spring.datasource.password: spring.datasource.password=${POSTGRES_PASSWORD}
spring.datasource.jpa.hibernate.ddl-auto: none spring.datasource.driver-class-name=org.postgresql.Driver
# JPA Configuration
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect