moved from prooph/micro#22
Scenario
- User creates a postgres/mysql database (
./bin/micro micro:setup:postgres)
- User creates a php-service and selects this postgres database as dependend (
./bin/micro micro:setup:php-service)
Feature Request
All MySQL and PostgreSQL databases created by micro cli commands, have a label prooph-pdo:true in the docker-compose.yml.
When the php-service is created, it should check for the prooph-pdo label and add the following environment variables to the php-image:
PROOPH_PDO_DSN=pgsql:host=postgres port=5432 dbname=micro_do
PROOPH_PDO_USER=postgres
PROOPH_PDO_PWD=
with the values of host name, port number, dbname, user & password taken from the docker-compose.yml file
Goal
In the PHP service you can create a database connection very easy with the given environment variables, so no additonal config is required for this service.
moved from prooph/micro#22
Scenario
./bin/micro micro:setup:postgres)./bin/micro micro:setup:php-service)Feature Request
All MySQL and PostgreSQL databases created by micro cli commands, have a label
prooph-pdo:truein the docker-compose.yml.When the php-service is created, it should check for the
prooph-pdolabel and add the following environment variables to the php-image:PROOPH_PDO_DSN=pgsql:host=postgres port=5432 dbname=micro_doPROOPH_PDO_USER=postgresPROOPH_PDO_PWD=with the values of host name, port number, dbname, user & password taken from the docker-compose.yml file
Goal
In the PHP service you can create a database connection very easy with the given environment variables, so no additonal config is required for this service.