3

When I build the war I can see .ebextension folder as shown below.
myapp.war
|------ .ebextensions
|------META-INF
|------org
|------WEB-INF

.ebextensions has two files
configuration.properties and 01do.config

Content of 01do.config
container_commands:
copy-config:
command: "cp .ebextensions/configuration.properties /etc/tomcat7/configuration.properties"

Command given in the config is not getting executed and there are no logs for this in cfn-init.log.

Please help. Thanks in Advance

Christina
  • 79
  • 1
  • 9

2 Answers2

2

Indentation is important.

container_commands:
  copy-config:
    command: "cp .ebextensions/configuration.properties /etc/tomcat7/configuration.properties"
Gustaf
  • 1,299
  • 8
  • 16
0

in gradle projects or other you need include .ebextension in your final package.

for gradle

for gradle 
<code>

bootJar {
    from('./.ebextensions') { into '.ebextensions' }
}
or

bootWar {
    from('./.ebextensions') { into '.ebextensions' }
}
</code>

Clean way of adding .ebextensions to Spring Boot Jar using Gradle

Juan
  • 41
  • 3