Files
ephub/.env
T

72 lines
3.5 KiB
Bash

# In all environments, the following files are loaded if they exist,
# the latter taking precedence over the former:
#
# * .env contains default values for the environment variables needed by the app
# * .env.local uncommitted file with local overrides
# * .env.$APP_ENV committed environment-specific defaults
# * .env.$APP_ENV.local uncommitted environment-specific overrides
#
# Real environment variables win over .env files.
#
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
# https://symfony.com/doc/current/configuration/secrets.html
#
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=
APP_SHARE_DIR=var/share
###< symfony/framework-bundle ###
###> symfony/routing ###
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
DEFAULT_URI=http://localhost
###< symfony/routing ###
###> 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
#
# MariaDB 11.x, as provided by DDEV. The mysql:// scheme is just DBAL's pdo_mysql alias --
# serverVersion is what selects MariaDBPlatform over MySQLPlatform, so keep it in sync with
# the container. DDEV writes the same value into the gitignored .env.local.
DATABASE_URL="mysql://db:db@db:3306/db?charset=utf8mb4&serverVersion=11.8.0-mariadb"
###< doctrine/doctrine-bundle ###
###> symfony/messenger ###
# Choose one of the transports below
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
###< symfony/messenger ###
###> symfony/mailer ###
MAILER_DSN=null://null
###< symfony/mailer ###
###> app/myep-oauth2 ###
# OAuth2 against myep, the EP identity provider. ephub is a confidential client using the
# authorization_code grant; it reads /api/userinfo once at login and then uses its own session,
# so the 10-minute access token is never stored or refreshed.
#
# Credentials come from `league:oauth2-server:create-client` ON MYEP. Register the callback
# https://ephub.ddev.site/auth/check for local dev, plus the production host. Leave the id and
# secret empty until then -- the login page detects it and says so.
#
# `email` is the address the account actually signed in with, and it is what the local `user`
# table is keyed on. It is not myep's account identifier -- that is the opaque, stable `sub`
# claim, which myep's consumer guide asks consumers to match on. Keying on email here is
# deliberate, at the price of a myep-side email change reading as a new account, so such a
# change has to be applied to the `user` table too. Do NOT use profile.communication.email: it
# is the first contact address on the BusPro record, shared by every account of the same person.
EP_OAUTH2_CLIENT_ID=
EP_OAUTH2_CLIENT_SECRET=
EP_OAUTH2_URL_AUTHORIZE=https://myep.ddev.site/authorize
EP_OAUTH2_URL_ACCESS_TOKEN=https://myep.ddev.site/token
EP_OAUTH2_URL_USERINFO=https://myep.ddev.site/api/userinfo
EP_OAUTH2_SCOPES=email,profile,roles
###< app/myep-oauth2 ###