Skip to content

Commit

Permalink
Fix rabbitMQ configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
RyuuKodex committed Dec 12, 2023
1 parent eb2f9c0 commit cdb5c07
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 17 deletions.
10 changes: 2 additions & 8 deletions app/.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@ APP_SECRET="a9806d99cd5c1503d8af30c963c9411f"
###< symfony/framework-bundle ###

###> doctrine/doctrine-bundle ###
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
#
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
# DATABASE_URL="mysql://app:[email protected]:3306/app?serverVersion=8.0.32&charset=utf8mb4"
# DATABASE_URL="mysql://app:[email protected]:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
DATABASE_URL="postgresql://app:[email protected]:5432/app?serverVersion=15&charset=utf8"
DATABASE_URL="mysql://user:password@database:3306/symfony-bootstrap"
###< doctrine/doctrine-bundle ###

###> symfony/messenger ###
MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
MESSENGER_TRANSPORT_DSN=amqp://guest:guest@rabbitmq:5672/%2f/messages
###< symfony/messenger ###
8 changes: 2 additions & 6 deletions app/config/packages/messenger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ framework:
# failure_transport: failed

transports:
# https://symfony.com/doc/current/messenger.html#transport-configuration
# async: '%env(MESSENGER_TRANSPORT_DSN)%'
# failed: 'doctrine://default?queue_name=failed'
# sync: 'sync://'
async: '%env(MESSENGER_TRANSPORT_DSN)%'

routing:
# Route your messages to the transports
# 'App\Message\YourMessage': async
'App\Command\CreateUserCommand': async

# when@test:
# framework:
Expand Down
3 changes: 0 additions & 3 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,3 @@ services:
MYSQL_DATABASE: "symfony-bootstrap"
MYSQL_USER: "user"
MYSQL_PASSWORD: "password"
rabbitmq:
image: rabbitmq:3-management
ports: [ 5672, 15672 ]
5 changes: 5 additions & 0 deletions etc/envs/compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ services:
database:
ports:
- "3306:3306"
rabbitmq:
image: rabbitmq:3-management
ports:
- '5672:5672'
- '15672:15672'
volumes:
composer_cache:
driver: local
Expand Down

0 comments on commit cdb5c07

Please sign in to comment.