Skip to content

Commit b66669c

Browse files
authored
Merge pull request #44 from PatternAtlas/liquibase_readonly
Liquibase readonly
2 parents 7c4056a + 99f6f31 commit b66669c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.docker/application.properties.tpl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ spring.jpa.properties.hibernate.show_sql=true
1515
spring.jpa.properties.hibernate.format_sql=true
1616
spring.jpa.properties.hibernate.use_sql_comments=true
1717
spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true
18-
spring.liquibase.enabled={{default .Env.PATTERN_ATLAS_FETCH_INITIAL_DATA "false"}}
18+
spring.liquibase.enabled={{default .Env.PATTERN_ATLAS_FETCH_INITIAL_DATA "false"}}
19+
spring.liquibase.password={{.Env.DB_INIT_PASSWORD}}
20+
spring.liquibase.user={{.Env.DB_INIT_USER}}
21+
spring.liquibase.url=jdbc:postgresql://{{.Env.JDBC_DATABASE_URL}}:{{.Env.JDBC_DATABASE_PORT}}/{{.Env.JDBC_DATABASE_NAME}}

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ ENV API_PORT 1977
2727
ENV JDBC_DATABASE_URL host.docker.internal
2828
ENV JDBC_DATABASE_USERNAME postgres
2929
ENV JDBC_DATABASE_PASSWORD postgres
30+
31+
# seperate user for database initialization (should have write-permissions)
32+
ENV DB_INIT_USER postgres
33+
ENV DB_INIT_PASSWORD postgres
34+
3035
ENV JDBC_DATABASE_NAME postgres
3136
ENV JDBC_DATABASE_PORT 5060
3237
ENV HAL_EXPLORER true

0 commit comments

Comments
 (0)