forked from Hithomelabs/CFTunnels
1.6 KiB
1.6 KiB
Database Configuration Changes
Production Profile Changes (application-prod.properties)
api.baseUrl=https://cftunnels.hithomelabs.com
# Production Database Configuration
spring.datasource.url=${PROD_DB_URL:jdbc:postgresql://postgres:5432/cftunnel}
spring.datasource.username=${PROD_DB_USERNAME:postgres}
spring.datasource.password=${PROD_DB_PASSWORD}
spring.datasource.driver-class-name=org.postgresql.Driver
# JPA Configuration
spring.jpa.hibernate.ddl-auto=validate
spring.jpa.show-sql=false
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
Test Profile Changes (application-test.properties)
api.baseUrl=https://testcf.hithomelabs.com
# Test Database Configuration - Using H2 in-memory
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.jpa.hibernate.ddl-auto=create-drop
spring.jpa.show-sql=true
spring.sql.init.mode=always
Required Production Environment Variables
Set these in your production deployment:
PROD_DB_URL- PostgreSQL connection URLPROD_DB_USERNAME- PostgreSQL usernamePROD_DB_PASSWORD- PostgreSQL password
Key Differences
- Production: Uses PostgreSQL with
validateDDL mode (no schema changes) - Test: Uses H2 in-memory with
create-dropDDL mode (fresh DB each test)
How to Scroll This File
- Terminal: Use
less filename.mdand arrow keys, ormore filename.md - Editor: Use mouse wheel or arrow keys
- Command line: Use
cat filename.md | head -20for first 20 lines