Skip to content

Commit 5e5e39f

Browse files
committed
Execute markdownfmt
Signed-off-by: Albert Lombarte <[email protected]>
1 parent c76a68f commit 5e5e39f

File tree

1 file changed

+25
-18
lines changed

1 file changed

+25
-18
lines changed

krakend/content.md

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ KrakenD is lightweight and straightforward as it only requires writing the confi
99
All features are designed to offer extraordinary performance and infinite scalability.
1010

1111
## How to use this image
12+
1213
KrakenD only needs a single configuration file to create an API Gateway, although you can have a complex setup reflecting your organization structure. The configuration file(s) can live anywhere in the container, but the default location is `/etc/krakend`.
1314

1415
To use the image, `COPY` your `krakend.json` file inside the container or mount it using a volume. The configuration is checked only once during the startup and never used again. Don't have a config file yet? Generate it with the [KrakenD Designer UI](https://designer.krakend.io).
1516

1617
⚠️ **NOTICE**: KrakenD does not use live reload when your configuration changes. Restart the container.
1718

1819
### Quick start
20+
1921
You can start an empty gateway with a health check with the following commands:
2022

2123
```console
@@ -26,28 +28,30 @@ $ curl http://localhost:8080/__health
2628
```
2729

2830
### More Examples
29-
The following are several examples of running KrakenD. By default, the command `run` is executed, but you can pass
30-
other commands and flags at the end of the run command.
31+
32+
The following are several examples of running KrakenD. By default, the command `run` is executed, but you can pass other commands and flags at the end of the run command.
3133

3234
The configuration files are taken from the current directory (`$PWD`). Therefore, all examples expect to find at least the file `krakend.json`.
3335

34-
#### Run with the debug enabled (flag `-d`):
36+
#### Run with the debug enabled (flag `-d`):
37+
3538
This flag is **SAFE to use in production**. It's meant to enable KrakenD as a fake backend itself by enabling a [`/__debug` endpoint](https://www.krakend.io/docs/endpoints/debug-endpoint/)
3639

3740
```console
3841
docker run -p 8080:8080 -v "${PWD}:/etc/krakend/" %%IMAGE%% run -d -c /etc/krakend/krakend.json
3942
```
4043

4144
#### Checking the syntax of your configuration file
45+
4246
See the [check command](https://www.krakend.io/docs/commands/check/)
4347

4448
```console
4549
docker run -it -v $PWD:/etc/krakend/ %%IMAGE%% check --config krakend.json
4650
```
47-
#### Show the help:
4851

49-
docker run -it %%IMAGE%% help
52+
#### Show the help:
5053

54+
docker run -it %%IMAGE%% help
5155

5256
### Building your custom KrakenD image
5357

@@ -85,22 +89,23 @@ RUN FC_ENABLE=1 \
8589
FROM %%IMAGE%%:<version>
8690
COPY --from=builder /tmp/krakend.json .
8791
```
92+
8893
Then build with `docker build -t my_krakend .`
8994

9095
The configuration above assumes you have a folder structure like the following:
91-
```
92-
.
93-
├── config
94-
│ ├── partials
95-
│ ├── settings
96-
│ │ └── env.json
97-
│ └── templates
98-
│ └── some.tmpl
99-
├── Dockerfile
100-
└── krakend.tmpl
101-
```
96+
97+
.
98+
├── config
99+
│ ├── partials
100+
│ ├── settings
101+
│ │ └── env.json
102+
│ └── templates
103+
│ └── some.tmpl
104+
├── Dockerfile
105+
└── krakend.tmpl
102106

103107
### Docker Compose example
108+
104109
Finally, a simple `docker-compose` file to start KrakenD with your API would be:
105110

106111
```yaml
@@ -134,10 +139,12 @@ services:
134139
command:
135140
command: ["krakend", "run", "-c", "krakend.tmpl", "-d"]
136141
```
142+
137143
### Container permissions and commands
144+
138145
All `krakend` commands are executed as `krakend` user (uid=1000) through `su-exec`, and the rest of the commands (e.g., `sh`) are executed as root.
139146

140147
You can directly use sub-commands of `krakend` like `run`, `help`, `version`, `check`, `check-plugin` or `validate` as the entrypoint will add the `krakend` command automatically. For example, the following lines are equivalent:
141148

142-
docker run -it %%IMAGE%% help
143-
docker run -it %%IMAGE%% krakend help
149+
docker run -it %%IMAGE%% help
150+
docker run -it %%IMAGE%% krakend help

0 commit comments

Comments
 (0)