From 685110a3cfb961feb8c005b1110585697346f7e5 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Tue, 15 Dec 2020 17:27:45 +0300 Subject: [PATCH] #16 updating README.md according to current configuration. Removing section about docker-compose (not working right now). Changing default APP_ENV in .env to 'dev' according to Symfony practice. --- .env | 2 +- README.md | 23 ++++++++++------------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.env b/.env index 228b2c0..f73b209 100644 --- a/.env +++ b/.env @@ -3,7 +3,7 @@ # https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration ###> symfony/framework-bundle ### -APP_ENV=prod +APP_ENV=dev APP_SECRET=xxx #TRUSTED_PROXIES=127.0.0.1,127.0.0.2 #TRUSTED_HOSTS=localhost,example.com diff --git a/README.md b/README.md index 2a8a6ee..e8a5df0 100644 --- a/README.md +++ b/README.md @@ -36,10 +36,15 @@ composer install composer install --no-dev --optimize-autoloader ``` -After dependencies installation you may be needed to create `.env` file (see `.env.dist`) +After dependencies installation you may be needed to create `.env.local` file (see `.env` for reference) or set appropriate [environment variables](https://en.wikipedia.org/wiki/Environment_variable) for production usage. +Check [Symfony documentation](https://symfony.com/doc/5.1/configuration.html#overriding-environment-values-via-env-local) for more details about `.env` files. + +You can also check [this post](https://symfony.com/doc/5.1/configuration/dot-env-changes.html) about `.env` changes in Symfony if you're updating from an +old version of the project. + ## Database configuration See [Symfony database configuration](https://symfony.com/doc/current/doctrine.html#configuring-the-database) @@ -50,8 +55,8 @@ You **must** set environment variables for both databases: magneticod's and magn ## Database schema migration ```bash -# Only for 'default' EntityManager (PostgreSQL) -php app/console doc:mig:mig --em=default +# Only for 'default' EntityManager (Application entities) +php bin/console doc:mig:mig --em=default ``` ## User creation @@ -59,19 +64,11 @@ php app/console doc:mig:mig --em=default ```bash # see --help for more info # If you don't specify the password it'll be requested from you in the command line -php app/console user:add [your_password] [--invites=10] +php bin/console user:add [your_password] [--invites=10] ``` ## Web assets installation ```bash -php app/console assets:install public --symlink -``` -## Running using Docker Compose - -```shell -docker-compose up - -# or with image rebuild -docker-compose up --build +php bin/console assets:install public --symlink ```