sopra-fs24-group-01 / sopra-fs24-plantparent-server

This is the Spring-based back end for the PlantParent website.
Apache License 2.0
0 stars 1 forks source link

Correctly separating dev H2 db and prod postgres db #177

Closed NorDar closed 4 months ago

NorDar commented 4 months ago

For development and testing a h2 in memory db should be used. For production a posgres db should be used.

One of the problems is that spring in their unending dark wizar-dreary ways breaks itself when importing h2 and postgres dependencies at the same time. Experiments with two different build files work locally but break as soon as they are rebuilt and deployed to GAE.

This means we now inject a different build definition during deployment.

NorDar commented 4 months ago

1bd6efa3cd6ccba1207b4a87b942e9cbb87167e7 811718ae6ef340b64b24906fe8ab08f67b56b9b1 791d7744034bc90a59d89815dd3ae041d358bb57

One sets the environment variable to spring_profiles_active=local for local development and spring_profiles_active=gcp for GAE deployment. GH Actions will replace the file accordingly during deployment.