GispoCoding / GS009_PostgreSQL_ja_PostGISin_perusteet

0 stars 0 forks source link

Update README.md for env settings #18

Closed ismogis closed 6 months ago

ismogis commented 6 months ago

Resolves: #12

ismogis commented 6 months ago

@JuhoErvasti If I understand correctly .env is needed only because of Terraform. Then on the other hand it is a common practice to have .env.template in the repository.

Does @LKajan or @RaineEkman have an opinion?

LKajan commented 6 months ago

That's right, currently we have quite clumsy process where Terraform/OpenTofu pulls this repository and invokes docker compose up which requires the .env file. Therefore the .env is needed here in the repo against the best practices. Favorable solution would be that we get rid of the public .env here and create one during the infra setup. Probably should set up the infra with OpenTofu and after that pull this repo and configure the .env with Ansible.

In a dreamworld:

  1. Fix .env.template to have right variables
  2. Remove .env
  3. Find a way to create .env during the cource infra set up

But I'm not sure what to do in the meantime until 3 is resolved.

JuhoErvasti commented 6 months ago

Okay! I wasn't aware of that side of it. For my part as far as this PR goes it's okay to merge. Or maybe the values from .env should copied over to the template until the Terraform/OpenTofu stuff is resolved?