diff --git a/README.md b/README.md index 9efcf507..6a977092 100644 --- a/README.md +++ b/README.md @@ -21,31 +21,7 @@ composer install You may alternatively need to run `php composer.phar install`, depending on how you installed Composer. -**2) Start the symfony web server** - -You can use Nginx or Apache, but Symfony's local web server -works even better - especially if you're using Docker for -the database. - -To install the Symfony local web server, follow -"Downloading the Symfony client" instructions found -here: https://symfony.com/download - you only need to do this -once on your system. - -Then, to start the web server, open a terminal, move into the -project, and run: - -``` -symfony serve -d -``` - -(If this is your first time using this command, you may see an -error that you need to run `symfony server:ca:install` first). - -Now check out the site at `https://localhost:8000`. You'll see -an error now - finish the setup instructions to get things working! - -**3) Database Setup (with Docker)** +**2) Database Setup (with Docker)** The easiest way to set up the database is to use the `docker-compose.yaml` file that's included in this project. First, make sure Docker is downloaded @@ -62,7 +38,7 @@ no need to configure `.env`. For more information about this approach, see https://symfonycasts.com/screencast/symfony5-doctrine -**3 Alternative) Database Setup (without Docker)** +**2 Alternative) Database Setup (without Docker)** If you do not want to use Docker, you can also just install and run MySQL manually. When you're done, open the `.env` file and make any @@ -70,13 +46,13 @@ adjustments you need - specifically `DATABASE_URL`. Or, better, you can create a `.env.local` file and *override* any configuration you need there (instead of changing `.env` directly). -** 4) Database Schema** +**3) Database Schema** To actually *create* the database and get some tables, run: ``` symfony console doctrine:database:create -symfony console doctrine:migrations:migrate +symfony console doctrine:schema:update --force symfony console doctrine:fixtures:load ``` @@ -88,6 +64,29 @@ If you get an error that the database exists, that should be ok. But if you have problems, completely drop the database (`doctrine:database:drop --force`) and try again. +**4) Start the symfony web server** + +You can use Nginx or Apache, but Symfony's local web server +works even better - especially if you're using Docker for +the database. + +To install the Symfony local web server, follow +"Downloading the Symfony client" instructions found +here: https://symfony.com/download - you only need to do this +once on your system. + +Then, to start the web server, open a terminal, move into the +project, and run: + +``` +symfony serve -d +``` + +(If this is your first time using this command, you may see an +error that you need to run `symfony server:ca:install` first). + +Now check out the site at `https://localhost:8000`. Enjoy! + ## Have Ideas, Feedback or an Issue? If you have suggestions or questions, please feel free to