Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set run once for clear-scheduler-cache at startup #72

Merged
merged 3 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions deployment/octane/FrankenPHP/supervisord.frankenphp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ command=php %(ENV_ROOT)s/artisan schedule:clear-cache
user=%(ENV_USER)s
autostart=%(ENV_WITH_SCHEDULER)s
autorestart=false
startsecs = 0
startretries = 1
stdout_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
stdout_logfile_maxbytes=0
stderr_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
Expand Down
2 changes: 2 additions & 0 deletions deployment/octane/RoadRunner/supervisord.roadrunner.conf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ command=php %(ENV_ROOT)s/artisan schedule:clear-cache
user=%(ENV_USER)s
autostart=%(ENV_WITH_SCHEDULER)s
autorestart=false
startsecs = 0
startretries = 1
stdout_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
stdout_logfile_maxbytes=0
stderr_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
Expand Down
2 changes: 2 additions & 0 deletions deployment/octane/Swoole/supervisord.swoole.conf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ command=php %(ENV_ROOT)s/artisan schedule:clear-cache
user=%(ENV_USER)s
autostart=%(ENV_WITH_SCHEDULER)s
autorestart=false
startsecs = 0
startretries = 1
stdout_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
stdout_logfile_maxbytes=0
stderr_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
Expand Down
9 changes: 8 additions & 1 deletion deployment/start-container
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
#!/usr/bin/env bash
set -e

container_mode=${CONTAINER_MODE:-http}
container_mode=${CONTAINER_MODE:-"http"}
octane_server=${OCTANE_SERVER}
running_migrations_and_seeders=${RUNNING_MIGRATIONS_AND_SEEDERS:-"false"}

echo "Container mode: $container_mode"

initialStuff() {
php artisan optimize:clear; \
php artisan event:cache; \
php artisan config:cache; \
php artisan route:cache;

if [ ${running_migrations_and_seeders} = "true" ]; then
echo "Running migrations and seeding database ..."
php artisan migrate --isolated --seed --force;
fi
}

if [ "$1" != "" ]; then
Expand Down
2 changes: 2 additions & 0 deletions deployment/supervisord.scheduler.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ command=php %(ENV_ROOT)s/artisan schedule:clear-cache
user=%(ENV_USER)s
autostart=true
autorestart=false
startsecs = 0
startretries = 1
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
Expand Down
Loading