Skip to content

Commit

Permalink
updating README to new format
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed May 20, 2021
1 parent f88aa42 commit 13f4ba9
Showing 1 changed file with 27 additions and 28 deletions.
55 changes: 27 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -62,21 +38,21 @@ 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
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
```

Expand All @@ -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
Expand Down

0 comments on commit 13f4ba9

Please sign in to comment.