.config file ignored with AWS Elastic Bean Stitch

I have an elastic bean stem web application. For some reason, I managed to install composer files to run my laravel application. The problem is that no other configuration file works. I placed newrelic.config in the .ebextensions / directory, but this file was ignored.

I recently tried to create a cron job using this AWS Elastic Beanstalk by running cronjob , but it does not work.

Example .config file:

container_commands:
  01_some_cron_job:
    command: "cat .ebextensions/some_cron_job.txt > /etc/cron.d/some_cron_job && chmod 644 /etc/cron.d/some_cron_job"
    leader_only: true

When I pass ssh to an ec2 instance, there is no directory like some_cron_job.

The source gets bound to the beanstalk, but the beanstalk does not execute commands.

How can I get beanstalk to recognize .config files. Fixing this cronjob will also fix installing a new relic, as both configurations are ignored, and I don't know why.

+4
source share
3 answers

Try putting it in the command section. This is more a server command than a container command.

commands:
  01_some_cron_job:
    command: "cat .ebextensions/some_cron_job.txt > /etc/cron.d/some_cron_job && chmod 644 /etc/cron.d/some_cron_job"
    leader_only: true
0
source

I had similar problems using container_commandsand files, however I put it off until the event filesand it worked like a miracle. My specific setting is as below.

.ebextensions / cron.config

files:
  "/etc/cron.d/mycronstuff":
       mode: "000644"
      owner: root
      group: root
    content: |
         # Run daily job every 8 hours
         0 */8 * * * root curl -i XXXXXXXXXX
         # Run nightly job at 2AM (8AM UTC)
         0 8 * * * root curl -i XXXXXXXXX
0
source

2019:

cron.yaml .

:

version: 1
 cron: 
   - name: "task1"
     url: "/scheduled"
     schedule: "* * * * *"
0
source

Source: https://habr.com/ru/post/1607223/