-
Notifications
You must be signed in to change notification settings - Fork 3
Feature/cu 86dwa58wh/upgrade dockerfile serversideup #298
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
base: 12.x
Are you sure you want to change the base?
Conversation
0b0a667
to
80496f3
Compare
80496f3
to
0b0a667
Compare
0b0a667
to
621c19d
Compare
#!/bin/sh | ||
set -e | ||
|
||
echo "Scheduler entrypoint script started." | ||
|
||
while true; do | ||
# Run the Laravel scheduler command. | ||
# We use 'php -d memory_limit=-1' to ensure it doesn't run out of memory. | ||
php -d memory_limit=-1 /var/www/html/artisan schedule:run | ||
|
||
# Wait for 60 seconds before the next run. | ||
sleep 60 | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not work due to the sleep not taking into account the duration of the schedule run, also, error handling is missing. Either run cron -f
as exec argument for the container with a new crontab, or have schedule:run
as the exec of the container and run a new instance of the container every 60 seconds via ecs native scheduler
https://laravel.com/docs/12.x/scheduling#running-the-scheduler
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html
id: task-def | ||
uses: aws-actions/amazon-ecs-render-task-definition@v1 | ||
with: | ||
task-definition: task-definition.json | ||
container-name: ${{ env.CONTAINER_NAME }} | ||
image: ${{ env.REGISTRY_URL }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }} | ||
container-name: sensifai |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
environment: develop | ||
strategy: | ||
matrix: | ||
service: [api, scheduler] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No queue worker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didnt have that present, will look into it, is there another side-service i should take into account?
Is it always needed or should be left as optional?
pgsql: | ||
image: 'postgres:16' | ||
ports: | ||
- '${FORWARD_DB_PORT:-5432}:5432' | ||
- '${FORWARD_DB_PORT:-5555}:5432' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had my local port in use and forgot about it, will set it back as default
⚡ {0} - {1} ⚡
💻 What type of change is this?
{3}
⭐ Description
For more background, see ticket {1}[in-progress].
📷 Screenshots
Before
After
💬 Comments
✅ Checklist
To review