@@ -118,7 +118,7 @@ private static function migrate_global_containers() {
118118 }
119119
120120 // Upgrade cron container
121- $ existing_cron_image = EE ::launch ( 'docker inspect --format= \'{{.Config.Image}} \' ee-cron-scheduler ' , false , true );
121+ $ existing_cron_image = EE ::launch ( 'docker inspect --format= \'{{.Config.Image}} \' ' . EE_CRON_SCHEDULER , false , true );
122122 if ( 0 === $ existing_cron_image ->return_code ) {
123123 self ::$ rsp ->add_step (
124124 'upgrade-cron-container ' ,
@@ -174,12 +174,12 @@ public static function nginxproxy_container_down( $existing_nginx_proxy_image )
174174 */
175175 public static function cron_container_up () {
176176 $ cron_image = 'easyengine/cron:v ' . EE_VERSION ;
177- $ cron_scheduler_run_command = 'docker run --name ee-cron-scheduler --restart=always -d -v ' . EE_ROOT_DIR . '/cron:/etc/ofelia:ro -v /var/run/docker.sock:/var/run/docker.sock:ro ' . $ cron_image ;
177+ $ cron_scheduler_run_command = 'docker run --name ' . EE_CRON_SCHEDULER . ' --restart=always -d -v ' . EE_ROOT_DIR . '/cron:/etc/ofelia:ro -v /var/run/docker.sock:/var/run/docker.sock:ro ' . $ cron_image ;
178178
179- default_launch ( 'docker rm -f ee-cron-scheduler ' , false , true );
179+ default_launch ( 'docker rm -f ' . EE_CRON_SCHEDULER , false , true );
180180
181181 if ( ! default_launch ( $ cron_scheduler_run_command , false , true ) ) {
182- throw new \Exception ( ' Unable to upgrade ee-cron-scheduler container ' );
182+ throw new \Exception ( ' Unable to upgrade ' . EE_CRON_SCHEDULER . ' container ' );
183183 }
184184 }
185185
@@ -192,12 +192,12 @@ public static function cron_container_up() {
192192 */
193193 public static function cron_container_down ( $ existing_cron_image ) {
194194 $ cron_image = trim ( $ existing_cron_image ->stdout );
195- $ cron_scheduler_run_command = 'docker run --name ee-cron-scheduler --restart=always -d -v ' . EE_ROOT_DIR . '/cron:/etc/ofelia:ro -v /var/run/docker.sock:/var/run/docker.sock:ro ' . $ cron_image ;
195+ $ cron_scheduler_run_command = 'docker run --name ' . EE_CRON_SCHEDULER . ' --restart=always -d -v ' . EE_ROOT_DIR . '/cron:/etc/ofelia:ro -v /var/run/docker.sock:/var/run/docker.sock:ro ' . $ cron_image ;
196196
197- default_launch ( 'docker rm -f ee-cron-scheduler ' , false , true );
197+ default_launch ( 'docker rm -f ' . EE_CRON_SCHEDULER , false , true );
198198
199199 if ( ! default_launch ( $ cron_scheduler_run_command , false , true ) ) {
200- throw new \Exception ( ' Unable to restore ee-cron-scheduler container ' );
200+ throw new \Exception ( ' Unable to restore ' . EE_CRON_SCHEDULER . ' container ' );
201201 }
202202 }
203203
0 commit comments