Skip to content

Conversation

sojeda
Copy link
Collaborator

@sojeda sojeda commented Jul 22, 2025

⚡ {0} - {1}

💻 What type of change is this?

{3}

⭐ Description

For more background, see ticket {1}[in-progress].

📷 Screenshots

Before

image

After

image

💬 Comments

✅ Checklist

To review

  • I have tested this change locally in multiple screen sizes
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • If my task include an endpoint, I add the endpoint to Hopscotch/Postman Project
  • Any dependent changes have been merged and published in downstream modules

@sojeda sojeda force-pushed the feature/cu-86dwa58wh/upgrade-dockerfile-serversideup branch from 0b0a667 to 80496f3 Compare July 22, 2025 17:10
@juancholightit juancholightit force-pushed the feature/cu-86dwa58wh/upgrade-dockerfile-serversideup branch from 80496f3 to 0b0a667 Compare July 22, 2025 17:13
@sojeda sojeda force-pushed the feature/cu-86dwa58wh/upgrade-dockerfile-serversideup branch from 0b0a667 to 621c19d Compare July 22, 2025 17:15
@juancholightit juancholightit requested review from Juan2418 and removed request for Juan2418 July 28, 2025 14:34
@juancholightit juancholightit self-assigned this Jul 28, 2025
Comment on lines +1 to +13
#!/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

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

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]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No queue worker?

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'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link

@juancholightit juancholightit Aug 11, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants