#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.

This commit is contained in:
Alexey Skobkin 2020-12-15 17:27:45 +03:00
parent 980423500f
commit 685110a3cf
No known key found for this signature in database
GPG Key ID: 5D5CEF6F221278E7
2 changed files with 11 additions and 14 deletions

2
.env
View File

@ -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

View File

@ -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_username> <your_email> [your_password] [--invites=10]
php bin/console user:add <your_username> <your_email> [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
```