Skip to content

Commit 81793a8

Browse files
Fixed ci errors and added makefile
1 parent d29d328 commit 81793a8

File tree

4 files changed

+40
-18
lines changed

4 files changed

+40
-18
lines changed

Makefile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#! /usr/bin/env make
2+
3+
user := "$(shell id -u):$(shell id -g)"
4+
ignored = '/docs/resources/references/* /docs/adr/*'
5+
6+
.PHONY : help lint fix
7+
.DEFAULT_GOAL : help
8+
9+
# This will output the help for each task. thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
10+
help: ## Show this help
11+
@printf "\033[33m%s:\033[0m\n" 'Available commands'
12+
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[32m%-18s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
13+
14+
lint: ## Runs the linting tool
15+
docker run --rm -u ${user} -v "$(shell pwd):/docs:ro" -e INPUT_IGNORE=${ignored} avtodev/markdown-lint:v1.5 \
16+
--config /docs/markdown-style-config.yml /docs
17+
18+
fix: ## Runs the linting tool and fixes simple mistakes
19+
docker run --rm -u ${user} -v "$(shell pwd):/docs" -e INPUT_FIX=true -e INPUT_IGNORE=${ignored} avtodev/markdown-lint:v1.5 \
20+
--config /docs/markdown-style-config.yml /docs

guides/hosting/performance/performance-tweaks.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ The Shopware cache has a global cache id to clear the cache faster and work in a
187187

188188
## .env.local.php
189189

190-
[Symfony recommends](https://symfony.com/doc/current/configuration.html#configuring-environment-variables-in-production) that a `.env.local.php` file is used in Production instead of a `.env` file, to skip parsing of the .env file on every request.
190+
[Symfony recommends](https://symfony.com/doc/current/configuration.html#configuring-environment-variables-in-production) that a `.env.local.php` file is used in Production instead of a `.env` file, to skip parsing of the .env file on every request.
191191
If you are using a containerized environment, all those variables can also be set directly in the environment variables, instead of dumping then to a file.
192192

193193
Since shopware 6.4.15.0 you can dump the content of the .env file to a `.env.local.php` file by running `bin/console system:setup --dump-env` or `bin/console dotenv:dump --env {APP_ENV}`.

guides/installation/from-scratch.md

+17-16
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Be aware this will be a vastly more complex solution since additional system req
88

99
## Prerequisites
1010

11-
- A Linux-based operating system (Windows installation is not covered here, but notes are provided about installing within a WSL instance)
12-
- An [Apache2 server installation](https://httpd.apache.org/docs/2.4/install.html) within the Linux-based operating system you have selected
13-
- Installation of all of the required packages mentioned in the [Installation overview](overview.md), there are two main goals you need to accomplish.
11+
- A Linux-based operating system (Windows installation is not covered here, but notes are provided about installing within a WSL instance)
12+
- An [Apache2 server installation](https://httpd.apache.org/docs/2.4/install.html) within the Linux-based operating system you have selected
13+
- Installation of all of the required packages mentioned in the [Installation overview](overview.md), there are two main goals you need to accomplish.
1414

1515
Please note that this guide is rather based on plugin development and contribution. If you need a template for full composer-based shop projects, please refer to the [production template](https://github.com/shopware/production).
1616

@@ -22,10 +22,10 @@ Firstly, we need to set up Apache to locate Shopware 6. If you wish you could co
2222

2323
In order to do this, you should add a vhost definition to your Apache site configuration.
2424

25-
1) Create a file with the following pattern: `/etc/apache2/sites-available/*.conf`.
25+
1) Create a file with the following pattern: `/etc/apache2/sites-available/*.conf`.
2626
Here we will create a file called `/etc/apache2/sites-available/shopware-install.conf`
2727

28-
2) Within the created `shopware-install.conf` file place the following configuration:
28+
1) Within the created `shopware-install.conf` file place the following configuration:
2929

3030
```text
3131
<VirtualHost *:80>
@@ -46,12 +46,14 @@ Here we will create a file called `/etc/apache2/sites-available/shopware-install
4646
</VirtualHost>
4747
```
4848

49-
3) Symlink the `shopware-install.conf` file to the Apache2 `sites-enabled` directory:
49+
1) Symlink the `shopware-install.conf` file to the Apache2 `sites-enabled` directory:
50+
5051
```shell
5152
sudo ln -s /etc/apache2/sites-available/shopware-install.conf /etc/apache2/sites-enabled/shopware-install.conf
5253
```
5354

54-
4) Restart the Apache2 service in order to activate your new configuration:
55+
1) Restart the Apache2 service in order to activate your new configuration:
56+
5557
```shell
5658
# Your mileage with this command may vary depending upon your chosen Linux operating system
5759
sudo service apache2 restart
@@ -77,36 +79,35 @@ Once `localhostForwarding` is enabled, you should update you name your local dev
7779
```text
7880
xxxxxx.dev.localhost
7981
```
82+
8083
...where 'xxxxxx' should be replaced with a 'hyphen/underscore separated' string.
8184

8285
{% hint style="info" %}
83-
Make sure the `APP_URL` variable defined within your `[PROJECT_ROOT]/.env` file matches the `ServerName` value within your Apache2 Vhost configuration
86+
Make sure the `APP_URL` variable defined within your `[PROJECT_ROOT]/.env` file matches the `ServerName` value within your Apache2 Vhost configuration
8487
{% endhint %}
8588

86-
8789
### Apache2 server configuration
8890

8991
Make sure following Apache modules are enabled:
9092

91-
* mod\_rewrite
92-
* mod\_headers
93-
* mod\_negotiation
93+
- mod\_rewrite
94+
- mod\_headers
95+
- mod\_negotiation
9496

9597
{% hint style="info" %}
96-
Checking if these modules are installed on apache is possible with the command `apachectl -M | grep [module_name]`. When searching for a specific module with `grep` make sure to only use the name suffix, such as "rewrite"
98+
Checking if these modules are installed on apache is possible with the command `apachectl -M | grep [module_name]`. When searching for a specific module with `grep` make sure to only use the name suffix, such as "rewrite"
9799
{% endhint %}
98100

99101
After a quick restart of apache you are done here.
100102

101103
{% hint style="info" %}
102-
For Mac (OSX) operating systems:
104+
For Mac (OSX) operating systems:
103105

104-
In your apache config, it is recommended to move the document root folder to the user's `$HOME` folder in order to avoid permission issues. This is the folder where Apache looks to serve file from. By default, the document root is configured as `/usr/local/var/www`.
106+
In your apache config, it is recommended to move the document root folder to the user's `$HOME` folder in order to avoid permission issues. This is the folder where Apache looks to serve file from. By default, the document root is configured as `/usr/local/var/www`.
105107

106108
As this is a development machine, let's assume we want to change the document root to point to a folder in our own home directory. Search for the term "DocumentRoot" in your `httpd.conf` apache configuration, and you should see the following line:
107109
{% endhint %}
108110

109-
110111
```bash
111112
DocumentRoot "/usr/local/var/www"
112113
```

guides/plugins/apps/custom-data/custom-entities.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ you need the appropriate [permissions](../../../../resources/references/app-refe
6262
## Shorthand prefix
6363

6464
Since v6.4.15.0 it is possible to also use the `ce_` shorthand prefix for your custom entities to prevent problems with length restrictions of names inside the DB.
65+
6566
```xml
6667
<?xml version="1.0" encoding="utf-8" ?>
6768
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/platform/trunk/src/Core/System/CustomEntity/Xml/entity-1.0.xsd">
@@ -85,4 +86,4 @@ POST /api/search/ce_blog
8586

8687
{% hint style="warning" %}
8788
Note that you can't rename existing custom entities as that would lead to the deletion of all existing data.
88-
{% endhint %}
89+
{% endhint %}

0 commit comments

Comments
 (0)