Symfony Secrets Management
5 min readMar 25, 2020
Are you tired of storing a file with your application secrets in a password manager and need to copy it to your CI/CD environment everytime you change it to deploy your application in a security compliant way?
Spin up Symfony
Create a docker-compose.yml in your project root and add the following:
(See PHP Docker development with XDEBUG explained here)
version: '3'
services:
php:
image: webdevops/php-nginx-dev:7.4
working_dir: /app
environment:
- WEB_DOCUMENT_ROOT=/app/public
- PHP_DISPLAY_ERRORS=1
- PHP_MEMORY_LIMIT=2048M
- PHP_MAX_EXECUTION_TIME=-1
- XDEBUG_REMOTE_AUTOSTART=1
- XDEBUG_REMOTE_PORT=9000
- XDEBUG_PROFILER_ENABLE=0
- XDEBUG_REMOTE_CONNECT_BACK=0
- XDEBUG_REMOTE_HOST=docker.for.mac.localhost
- php.xdebug.idekey=PHPSTORM
- php.xdebug.remote_enable=1
- php.xdebug.max_nesting_level=1000
ports:
- "8080:80"
volumes:
- ./:/app:rw,cached
depends_on:
- mysql
mysql:
image: mysql:5.7
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
MYSQL_USER: test
MYSQL_PASSWORD: test
Spin up the service with docker-compose up and install Symfony 5 to get the app running: