-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layer1 deploy #10
base: develop
Are you sure you want to change the base?
Layer1 deploy #10
Conversation
Githook copies contents from mms5-layer1-service file application.conf.example into new file called application.conf
docs/post-merge
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is meant to be opening the application.conf.example file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll edit the comment to reflect that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
docs/post-merge
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.