Skip to content

Commit

Permalink
#47: Let SYNC_ALLOWED_BLOCK_CODES to be configured in .env.
Browse files Browse the repository at this point in the history
This uses an encoded JSON array to pass from shell, to YAML.
  • Loading branch information
adamfranco committed Nov 25, 2024
1 parent b29b40e commit 5ec4543
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ SCHEDULES_IMAGE_FONT_FILE=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
# Sync
SYNC_ERROR_MAIL_TO="[email protected]"
SYNC_ERROR_MAIL_FROM="[email protected]"
# A JSON encoded array of Block Codes that should be exposed to users.
SYNC_ALLOWED_BLOCK_CODES='["CC"]'
# Sync destination (this application's database)
SYNC_DESTINATION_DSN="mysql:host=database;port=3306;dbname=symfony;charset=utf8mb4"
SYNC_DESTINATION_USERNAME=symfony
Expand Down
3 changes: 1 addition & 2 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ services:
$errorMailFrom: '%env(SYNC_ERROR_MAIL_FROM)%'
App\Service\CatalogSync\Syncer\OciSyncer:
arguments:
$allowedBlckCodes:
- "CC"
$allowedBlckCodes: '%env(json:SYNC_ALLOWED_BLOCK_CODES)%'
App\Service\CatalogSync\Database\Destination\PdoDestinationDatabase:
arguments:
$dsn: '%env(SYNC_DESTINATION_DSN)%'
Expand Down

0 comments on commit 5ec4543

Please sign in to comment.