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

Add RabbitMQ to docker-compose.yaml (#186) #187

Merged
merged 4 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
8 changes: 8 additions & 0 deletions .docker/messenger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
framework:
messenger:
transports:
pimcore_core: '%env(MESSENGER_TRANSPORT_DSN)%pimcore_core'
brusch marked this conversation as resolved.
Show resolved Hide resolved
pimcore_maintenance: '%env(MESSENGER_TRANSPORT_DSN)%pimcore_maintenance'
pimcore_scheduled_tasks: '%env(MESSENGER_TRANSPORT_DSN)%pimcore_scheduled_tasks'
pimcore_image_optimize: '%env(MESSENGER_TRANSPORT_DSN)%pimcore_image_optimize'
pimcore_asset_update: '%env(MESSENGER_TRANSPORT_DSN)%pimcore_asset_update'
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
"require": {
"pimcore/pimcore": "^11.1",
"pimcore/admin-ui-classic-bundle": "^1.2",
"symfony/runtime": "^6.2",
"symfony/dotenv": "^6.2"
"symfony/amqp-messenger": "^6.2",
"symfony/dotenv": "^6.2",
"symfony/runtime": "^6.2"
},
"require-dev": {
"codeception/codeception": "^5.0.3",
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ services:
image: redis:alpine
command: [ redis-server, --maxmemory 128mb, --maxmemory-policy volatile-lru, --save "" ]

rabbitmq:
image: rabbitmq:alpine
brusch marked this conversation as resolved.
Show resolved Hide resolved

db:
image: mariadb:10.11
working_dir: /application
Expand Down Expand Up @@ -40,6 +43,7 @@ services:
environment:
COMPOSER_HOME: /var/www/html
PHP_IDE_CONFIG: serverName=localhost
MESSENGER_TRANSPORT_DSN: amqp://guest:guest@rabbitmq:5672/%2f/
# Feed installer configuration via ENV variables.
# See: https://pimcore.com/docs/pimcore/current/Development_Documentation/Getting_Started/Advanced_Installation_Topics.html#page_Advanced-Installation-Topics
PIMCORE_INSTALL_MYSQL_USERNAME: pimcore
Expand All @@ -52,15 +56,21 @@ services:
condition: service_healthy
volumes:
- .:/var/www/html
- ./.docker/messenger.yaml:/var/www/html/config/packages/messenger.yaml:ro

supervisord:
#user: '1000:1000' # set to your uid:gid
image: pimcore/pimcore:php8.2-supervisord-latest
environment:
MESSENGER_TRANSPORT_DSN: amqp://guest:guest@rabbitmq:5672/%2f/
depends_on:
rabbitmq:
condition: service_started
db:
condition: service_healthy
volumes:
- .:/var/www/html
- ./.docker/messenger.yaml:/var/www/html/config/packages/messenger.yaml:ro
- ./.docker/supervisord.conf:/etc/supervisor/conf.d/pimcore.conf:ro

# The following two services are used for testing.
Expand Down
Loading