3

so I have the following .config in my .ebextensions direcory. It's a tomcat8 environment:

    container_commands: 
  replace-web_xml: 
    command: cp .ebextensions/web.xml /etc/tomcat8/web.xml
  replace-config: 
    command: cp .ebextensions/insign.properties /var/lib/tomcat8/webapps/insign.properties

Now replace-web_xml is working fine,only the replace-config command isn't working. The file is not being copied to that location. I've looked into the log but couldnt find anything that could cause this.

Any ideas?

Thanks

Scrat
  • 33
  • 4
  • any luck with this? I'm trying to accomplish the same thing, and so far all attempts have failed with little log to indicate where it's going wrong. – wkhatch Nov 23 '16 at 17:33

1 Answers1

0

Stumbled onto this now. Even if it's ages old, someone might need the answer. The problem is that since there is no cwd specified, the command is run from / by default. You need to set cwd as an instruction just above command to be able to run the command in the question. The directory to be set depends on the language used for your application. I haven't been able to find an actual list that specifies this. I would use ssh to login to an instance and see where the application is located.

Henrik Hansson
  • 869
  • 6
  • 6