You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/topics/setup.md
+29-3Lines changed: 29 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,31 @@ Setting up the server should be quick and easy. These are the necessary steps:
4
4
5
5
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`)
6
6
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.
9
9
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.
10
11
11
12
*Of course, you should deploy the project to where it will be hosted (probably before step 2).*
12
13
13
14
That's it, you should be up and running. You might want to [tweak the configuration](configuration.md) or to setup automatic recipe updates.
14
15
15
16
Installing a monitoring tool (like [Sentry](https://sentry.io)) is recommended.
16
17
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
+
17
32
### Using the server
18
33
19
34
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
25
40
}
26
41
}
27
42
28
-
####Running the server locally
43
+
### Running the server locally
29
44
30
45
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
+
31
49
Make sure to allow connections over http to composer (if using localhost) by adding this to the project's `composer.json`:
32
50
33
51
{
@@ -38,3 +56,11 @@ Make sure to allow connections over http to composer (if using localhost) by add
38
56
}
39
57
40
58
*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