Skip to content

Latest commit

 

History

History
60 lines (43 loc) · 1.47 KB

File metadata and controls

60 lines (43 loc) · 1.47 KB

Installation

Requirements

Composer

composer require nowo-tech/runtime-env-bundle

With Symfony Flex, the recipe registers the bundle and copies:

  • config/packages/nowo_runtime_env.yaml
  • config/packages/security_nowo_runtime_env.yaml
  • config/routes/nowo_runtime_env.yaml

DoctrineEncryptBundle

Configure a Halite (or Defuse) profile before storing variables. The encryptor key must live in .env / key files — never in the runtime-env table.

# config/packages/nowo_doctrine_encrypt.yaml
nowo_doctrine_encrypt:
    default_profile: default
    profiles:
        default:
            encryptor_class: Halite
            secret_key_path: '%kernel.project_dir%/config/secrets/halite.key'

Generate a key (see DoctrineEncryptBundle docs):

php bin/console nowo:doctrine-encrypt:generate-secret-key

Schema

Create/update the schema (table name = {table_prefix}_variables, default runtime_env_variables):

php bin/console doctrine:schema:update --force
# or a proper migration

Firewall

Protect the panel prefix (recipe adds an access_control example):

security:
    access_control:
        - { path: ^/_runtime_env, roles: ROLE_ADMIN }