Merged in readme_update (pull request #47)

#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 Eschenko 2020-12-15 15:20:56 +00:00
commit e06a46508a
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 # https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
###> symfony/framework-bundle ### ###> symfony/framework-bundle ###
APP_ENV=prod APP_ENV=dev
APP_SECRET=xxx APP_SECRET=xxx
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2 #TRUSTED_PROXIES=127.0.0.1,127.0.0.2
#TRUSTED_HOSTS=localhost,example.com #TRUSTED_HOSTS=localhost,example.com

View file

@ -36,10 +36,15 @@ composer install
composer install --no-dev --optimize-autoloader 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) or set appropriate [environment variables](https://en.wikipedia.org/wiki/Environment_variable)
for production usage. 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 ## Database configuration
See [Symfony database configuration](https://symfony.com/doc/current/doctrine.html#configuring-the-database) 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 ## Database schema migration
```bash ```bash
# Only for 'default' EntityManager (PostgreSQL) # Only for 'default' EntityManager (Application entities)
php app/console doc:mig:mig --em=default php bin/console doc:mig:mig --em=default
``` ```
## User creation ## User creation
@ -59,19 +64,11 @@ php app/console doc:mig:mig --em=default
```bash ```bash
# see --help for more info # see --help for more info
# If you don't specify the password it'll be requested from you in the command line # 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 ## Web assets installation
```bash ```bash
php app/console assets:install public --symlink php bin/console assets:install public --symlink
```
## Running using Docker Compose
```shell
docker-compose up
# or with image rebuild
docker-compose up --build
``` ```