Layer1 deploy#10
Conversation
Githook copies contents from mms5-layer1-service file application.conf.example into new file called application.conf
| if os.path.exists(file_path): | ||
| # open both files | ||
| app_example = "mms5-layer1-service/src/main/resources/application.conf.example" | ||
| with open(file_path,'r') as firstfile, open(file_path,'w') as secondfile: |
There was a problem hiding this comment.
I think this is meant to be opening the application.conf.example file?
There was a problem hiding this comment.
Yes, I'll edit the comment to reflect that.
There was a problem hiding this comment.
application.conf.example should be copied to application.conf, not the other way around. Also, it should only write to the file if it does not exist. I'd suggest using 'x' file flag in the call to open with a try catch.
There was a problem hiding this comment.
It looks like the application.conf is a hidden file and actually does exist within that directory. The issue was that it was empty and so that would produce the original error. Because of this, the 'w' flag would be more appropriate as the 'x' flag will cause a "FileAlreadyExists" error. I have added the changes.
| if os.path.exists(file_path): | ||
| # open both files | ||
| app_example = "mms5-layer1-service/src/main/resources/application.conf.example" | ||
| with open(file_path,'r') as firstfile, open(file_path,'w') as secondfile: |
There was a problem hiding this comment.
application.conf.example should be copied to application.conf, not the other way around. Also, it should only write to the file if it does not exist. I'd suggest using 'x' file flag in the call to open with a try catch.
|



Added single-server deployment for mms5-layer1-service and added a post-merge githook that will copy contents of the application.conf.example into application.conf if the latter does not exist inside mms5-layer1-service.