Skip to content

Commit db02f62

Browse files
committed
Updates the documentation
1 parent f32818d commit db02f62

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

docs/topics/setup.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,31 @@ Setting up the server should be quick and easy. These are the necessary steps:
44

55
1. [Download](https://github.com/moay/server-for-symfony-flex/releases) the project from Github (or `git clone https://github.com/moay/server-for-symfony-flex`)
66
2. Navigate to the project folder and run `composer install`.
7-
3. Open the file `config/parameters.yaml` and enter the url to your private recipes repo (or provide appropriate environment variables).
8-
4. Setup the `APP_ENV` properly. This can be done in the `.env` file (create if needed) or on the hosting. Setting it to `prod` is recommended.
7+
3. Copy the `.env` file to `.env.local` and setup your project.
8+
4. Setup the `APP_ENV` properly. This can be done in the `.env.local` file or on the hosting. Setting it to `prod` is recommended.
99
5. Run `php bin/console recipes:initialize` in order to download your recipes.
10+
6. In order to have a working UI, you'll need to build the assets that come with the project. Make sure to run node in any version higher than 10 (tested up to 15) an run `npm install` followed by `npm run build` to build the needed files.
1011

1112
*Of course, you should deploy the project to where it will be hosted (probably before step 2).*
1213

1314
That's it, you should be up and running. You might want to [tweak the configuration](configuration.md) or to setup automatic recipe updates.
1415

1516
Installing a monitoring tool (like [Sentry](https://sentry.io)) is recommended.
1617

18+
### Updating from v1.3 to v1.4
19+
20+
We switched from composer v1 to v2. Make sure to run composer v2 when running `composer install`. Also if you run into this error:
21+
```
22+
Failed to create closure from callable: class 'Http\HttplugBundle\Discovery \ConfiguredClientsStrategy' does not have a method 'onEvent'
23+
```
24+
you'll have to delete your caches. Should be possible with:
25+
26+
```
27+
rm -rf var/cache/* && bin/console cache:clear
28+
```
29+
30+
Running another `composer install` after this is recommended.
31+
1732
### Using the server
1833

1934
Using the server in your Symfony project is as easy as adding the proper endpoint to your `composer.json`:
@@ -25,9 +40,12 @@ Using the server in your Symfony project is as easy as adding the proper endpoin
2540
}
2641
}
2742

28-
#### Running the server locally
43+
### Running the server locally
2944

3045
Running the server locally is possible by using symfony's server command: `php bin/console server:start` (oder `server:run` for a temporary instance).
46+
47+
#### Local http
48+
3149
Make sure to allow connections over http to composer (if using localhost) by adding this to the project's `composer.json`:
3250

3351
{
@@ -38,3 +56,11 @@ Make sure to allow connections over http to composer (if using localhost) by add
3856
}
3957

4058
*It is not recommended to run the server locally. The best setup would be a private server behind a firewall.*
59+
60+
#### With Symfony CLI
61+
62+
You can also run the server using the [Symfony CLI](https://symfony.com/download) by using the command `symfony serve` or `symfony serve -d` to run it in the background. This should enable https by default. This was not tested thoroughly, but a proper hosting should be preferred anyway.
63+
64+
### Running the server using docker
65+
66+
A docker setup is provided. Take a look at the given `docker-compose.yml`. The setup of dependencies (both node and PHP) as well as asset building is included in the setup.

0 commit comments

Comments
 (0)