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
@@ -10,29 +9,22 @@ A bunch of custom error pages for Traefik built with [Jekyll](https://jekyllrb.c
10
9
11
10
## Installation
12
11
12
+
Install dependencies
13
13
```bash
14
14
$ bundle install
15
15
```
16
16
17
-
## Development
18
-
19
-
The current folder will be generated into ./_site :
17
+
If you want to build the project on your host:
20
18
```bash
21
19
$ jekyll build
22
20
```
23
21
24
-
Build the site on the preview server :
22
+
If you want to preview the pages before building the Docker image :
25
23
```bash
26
24
$ jekyll serve
27
25
$ open http://127.0.0.1:4000/
28
26
```
29
27
30
-
## Production
31
-
32
-
You can use this project in production with Netlify:
33
-
34
-
[](https://app.netlify.com/start/deploy?repository=https://github.com/guillaumebriday/traefik-custom-error-pages)
35
-
36
28
## How to use with Traefik and Docker
37
29
38
30
Labels are already define in the image to work with Traefik.
@@ -43,6 +35,28 @@ To use it in production just run the container :
43
35
$ docker run -d --restart always guillaumebriday/traefik-custom-error-pages
44
36
```
45
37
38
+
## Build the image
39
+
40
+
This is a [multi-stage build](https://docs.docker.com/develop/develop-images/multistage-build/), to build the final image:
As you can see in the Dockerfile, I use [Nginx](https://www.nginx.com/) as Web server to serve static files. To generate this pages, I use [Jekyll](https://jekyllrb.com/) in the first step of the build.
48
+
49
+
For traefik, I hardcoded [Labels](https://docs.traefik.io/user-guide/docker-and-lets-encrypt/#labels) in the Dockerfile.
50
+
51
+
You will find in this article [https://www.techjunktrunk.com/docker/2017/11/03/traefik-default-server-catch-all](https://www.techjunktrunk.com/docker/2017/11/03/traefik-default-server-catch-all/] why I set up `priority` and `rule` this way.
0 commit comments