Skip to content

Commit 1d7f233

Browse files
doc: Added dev and stop Make recipes
1 parent 185aefd commit 1d7f233

File tree

2 files changed

+42
-32
lines changed

2 files changed

+42
-32
lines changed

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,14 @@ changelog:
3434

3535
bump:
3636
git-cliff --bump -o CHANGELOG.md
37+
38+
##
39+
## Start the development environment using Symfony server and Docker
40+
##
41+
dev:
42+
docker compose -f docker-compose.symfony.yml up -d
43+
symfony serve -d
44+
45+
stop:
46+
symfony server:stop
47+
docker compose -f docker-compose.symfony.yml down

README.md

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,36 @@ When you're ready you can check that *Symfony* console responds through your Doc
3737
docker compose exec -u www-data app bin/console
3838
```
3939

40+
### Using `symfony server:start` instead of Docker
41+
42+
If you are working on a *macOS* environment, you may prefer using `symfony` binary to start a local webserver instead of using
43+
a full _Docker_ stack. You will need to install `symfony` binary first:
44+
45+
```shell
46+
curl -sS https://get.symfony.com/cli/installer | bash
47+
```
48+
49+
And make sure your local PHP environment is configured with php-intl, php-redis, php-gd extensions.
50+
You will need to use at least *MySQL* and *Redis* (and *Solr* if needed) services from Docker stack in order to run your application.
51+
52+
```shell
53+
docker compose -f docker-compose.symfony.yml up -d
54+
```
55+
56+
- Configure your `.env.local` variables to use your local MySQL and Redis services. Replacing `db`, `redis`, `mailer` and `solr` hostnames with `127.0.0.1`. Make sure to use `127.0.0.1` and not `localhost` on *macOS* as it will not work with Docker.
57+
- Remove `docker compose exec -u www-data app ` prefix from all commands in `Makefile` to execute recipes locally.
58+
- Remove cache invalidation Varnish configuration from `config/packages/api_platform.yaml` and `config/packages/roadiz_core.yaml` file.
59+
60+
Then you can start your local webserver:
61+
62+
```shell
63+
symfony serve -d
64+
```
65+
66+
Perform all installation steps described above, without using `docker compose exec` command.
67+
68+
Then your Roadiz backoffice will be available at `https://127.0.0.1:8000/rz-admin`
69+
4070
### Generate [Symfony secrets](https://symfony.com/doc/current/configuration/secrets.html)
4171

4272
When you run `composer create-project` first time, following command should have been executed automatically:
@@ -120,7 +150,6 @@ make update
120150
This will **only load node-types** that are not already in the database. But it won't create any migration.
121151
This is the same script that is executed when you run `make install` and in your docker image entrypoint.
122152

123-
124153
### Features
125154

126155
- Configured to be used in headless mode with *API Platform*
@@ -202,37 +231,7 @@ You can fetch this endpoint once in your website frontend, instead of embedding
202231

203232
Make sure your `.env` file does not contain any sensitive data as it must be added to your repository: `git add --force .env`
204233
in order to be overridden by `.env.local` file.
205-
Sensitive and local data must be filled in `.env.local` which is git-ignored.
206-
207-
### Using `symfony server:start` instead of Docker
208-
209-
If you are working on a *macOS* environment, you may prefer using `symfony` binary to start a local webserver instead of using
210-
a full _Docker_ stack. You will need to install `symfony` binary first:
211-
212-
```shell
213-
curl -sS https://get.symfony.com/cli/installer | bash
214-
```
215-
216-
And make sure your local PHP environment is configured with php-intl, php-redis, php-gd extensions.
217-
You will need to use at least *MySQL* and *Redis* (and *Solr* if needed) services from Docker stack in order to run your application.
218-
219-
```shell
220-
docker compose -f docker-compose.symfony.yml up -d
221-
```
222-
223-
- Configure your `.env` variables to use your local MySQL and Redis services. Replacing `db`, `redis`, `mailer` and `solr` hostnames with `127.0.0.1`. Make sure to use `127.0.0.1` and not `localhost` on *macOS* as it will not work with Docker.
224-
- Remove `docker compose exec -u www-data app ` prefix from all commands in `Makefile` to execute recipes locally.
225-
- Remove cache invalidation Varnish configuration from `config/packages/api_platform.yaml` and `config/packages/roadiz_core.yaml` file.
226-
227-
Then you can start your local webserver:
228-
229-
```shell
230-
symfony server:start
231-
```
232-
233-
Perform all installation steps described above, without using `docker compose exec` command.
234-
235-
Then your Roadiz backoffice will be available at `https://127.0.0.1:8000/rz-admin`
234+
Sensitive and local data must be filled in `.env.local` which is git-ignored.
236235

237236
### Make node-types editable on production environment
238237

0 commit comments

Comments
 (0)