Reputation: 11
I am deploying a spring boot war to a single instance AWS Elastic Beanstalk environment and trying to run a postdeploy script.
I have successfully had .ebextension scripts executed and attempted to follow the same pattern for the .platform/hooks/postdeploy directory but unfortunately EB isn't able to find the directory.
I get the following in the eb-engine.log:
[INFO] Executing platform hooks in .platform/hooks/postdeploy/
[INFO] The dir .platform/hooks/postdeploy/ does not exist
[INFO] Finished running scripts in /var/app/current/.platform/hooks/postdeploy
[INFO] Executing cleanup logic
I have verified the directory and script are placed inside the WAR file under /WEB-INF/classes:
Directory structure under .platform is .platform/hooks/postdeploy/myscript.sh
The EB environment is an Amazon Linux 2.
Any ideas why EB can't find the .platform/hooks/postdeploy directory? When I cd in /var/app I see a jar file and a Procfile.
Upvotes: 1
Views: 646
Reputation: 11
In my case, I spent one entire week wondering why my configs are not correctly detected..
As mentioned here the .platform correct path is {project_root_directory}/.platform/
and thought I was doing everything fine.
But it need to look like this into your archive ! The root of the zip must have the .platform into
In my case it was : foobar.zip/{project_root_directory}/.platform/
But it must be :foobar.zip/.platform/
Upvotes: 1