-
-
Notifications
You must be signed in to change notification settings - Fork 770
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
Async Symfony Messenger #681
base: main
Are you sure you want to change the base?
Conversation
```yaml | ||
php-worker: | ||
image: ${IMAGES_PREFIX:-}app-php-worker | ||
restart: unless-stopped | ||
environment: | ||
- RUN_MIGRATIONS=false | ||
healthcheck: | ||
disable: true | ||
depends_on: | ||
- php | ||
``` |
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.
```yaml | |
php-worker: | |
image: ${IMAGES_PREFIX:-}app-php-worker | |
restart: unless-stopped | |
environment: | |
- RUN_MIGRATIONS=false | |
healthcheck: | |
disable: true | |
depends_on: | |
- php | |
``` | |
```yaml | |
php-worker: | |
image: ${IMAGES_PREFIX:-}app-php-worker | |
restart: unless-stopped | |
environment: | |
- RUN_MIGRATIONS=false | |
healthcheck: | |
disable: true | |
depends_on: | |
- php |
```yaml | ||
php-worker: | ||
build: | ||
context: . | ||
target: frankenphp_prod | ||
environment: | ||
APP_SECRET: ${APP_SECRET} | ||
``` |
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.
```yaml | |
php-worker: | |
build: | |
context: . | |
target: frankenphp_prod | |
environment: | |
APP_SECRET: ${APP_SECRET} | |
``` | |
```yaml | |
php-worker: | |
build: | |
context: . | |
target: frankenphp_prod | |
environment: | |
APP_SECRET: ${APP_SECRET} |
+ run_migrations=${RUN_MIGRATIONS:-true} | ||
+ if grep -q ^DATABASE_URL= .env && [ "$run_migrations" = "true" ]; then |
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.
Maybe combine these lines into one?
+ run_migrations=${RUN_MIGRATIONS:-true} | |
+ if grep -q ^DATABASE_URL= .env && [ "$run_migrations" = "true" ]; then | |
+ if grep -q ^DATABASE_URL= .env && [ "${RUN_MIGRATIONS:-true}" = "true" ]; then |
Great work, @k-37! Do you think it makes sense to create a new entrypoint for the php-worker:
# ...
environment:
- RUN_MIGRATIONS=false
- CONSUMER_TIME_LIMIT=60
- CONSUMER_LIMIT=10
- CONSUMER_MEMORY_LIMIT=128M
command: ['async'] |
This is proposal to fix issue #539 based on my interpretation of conversation in the issue.