Search code examples
amazon-web-servicesdockerodoo

run script when scaling an instance of aws (docker container)


good morning,

I am using odoo in aws, and I have the problem that every time the instance scales to a higher or lower one, the Odoo system does not load correctly, it does not stop working, only the view does not display well. How can I ensure that each time it scales, it automatically executes some commands. the odoo instance is raised with Docker.

I will greatly appreciate your help.

Thank you.


Solution

  • You can use crontab for linux, and have the following cron rule:

    @reboot <command that will your app>
    

    For windows server you can utilize the windows startup scripts reference here.