feat: created dev and prod properties, changed main properties for work with profiles

This commit is contained in:
vilar 2025-12-17 18:19:22 +05:00
parent c2d2948525
commit 051af6d293
3 changed files with 25 additions and 3 deletions

View file

@ -0,0 +1,9 @@
# database init, supports postgres too
database=postgres
spring.datasource.url=${POSTGRES_URL:jdbc:postgresql://localhost:5433/petclinic_dev}
spring.datasource.username=${POSTGRES_USER:petclinic}
spring.datasource.password=${POSTGRES_PASS:petclinic}
# SQL is written to be idempotent so this is safe
spring.sql.init.mode=always
spring.liquibase.contexts=dev

View file

@ -0,0 +1,9 @@
# database init, supports postgres too
database=postgres
spring.datasource.url=${POSTGRES_URL:jdbc:postgresql://localhost:5432/petclinic}
spring.datasource.username=${POSTGRES_USER:petclinic}
spring.datasource.password=${POSTGRES_PASS:petclinic}
# SQL is written to be idempotent so this is safe
spring.sql.init.mode=always
spring.liquibase.contexts=prod

View file

@ -1,7 +1,11 @@
# database init, supports mysql too
database=h2
spring.sql.init.schema-locations=classpath*:db/${database}/schema.sql
spring.sql.init.data-locations=classpath*:db/${database}/data.sql
database=dev
spring.profiles.active=${database}
# spring.sql.init.schema-locations=classpath*:db/${database}/schema.sql
# spring.sql.init.data-locations=classpath*:db/${database}/data.sql
spring.liquibase.change-log=classpath:db/changelog/db.changelog-master.xml
# Web
spring.thymeleaf.mode=HTML