Skip to content

Commit 436e637

Browse files
committed
Remove nginx config leftovers
Check first commit for explanations
1 parent ab34ee5 commit 436e637

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

services/traefik/docker-compose.yml.j2

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -221,63 +221,10 @@ services:
221221
networks:
222222
- public
223223

224-
error-pages-static-webserver:
225-
image: nginx:1.25.1
226-
networks:
227-
- public
228-
configs:
229-
- source: ${STACK_NAME}_503_api_json
230-
target: /usr/share/nginx/api/503.json
231-
- source: ${STACK_NAME}_503_web_html
232-
target: /usr/share/nginx/html/503.html
233-
- source: ${STACK_NAME}_nginx_error_pages_config
234-
target: /etc/nginx/conf.d/default.conf
235-
deploy:
236-
labels:
237-
# defining labels as list has advantage in interpolation
238-
# https://docs.docker.com/reference/compose-file/interpolation/
239-
# disadvantage: we cannot reuse values with yaml `& and *` syntax
240-
- traefik.enable=true
241-
242-
# middleware for ops traefik. Use for custom 503 (json) api response
243-
- traefik.http.middlewares.custom-50x-json-errors.errors.status=500,501,503,505-599
244-
- traefik.http.middlewares.custom-50x-json-errors.errors.service=traefik_error_page_json
245-
- traefik.http.middlewares.custom-50x-json-errors.errors.query=/503.json
246-
247-
# middleware for ops traefik. Use for custom 503 html response
248-
- traefik.http.middlewares.custom-50x-html-errors.errors.status=500,501,503,505-599
249-
- traefik.http.middlewares.custom-50x-html-errors.errors.service=traefik_error_page_html
250-
- traefik.http.middlewares.custom-50x-html-errors.errors.query=/503.json
251-
252-
# rule to serve custom 503 error html page
253-
- traefik.http.routers.traefik_error_page_html.entrypoints=http
254-
- traefik.http.routers.traefik_error_page_html.priority=1
255-
- traefik.http.routers.traefik_error_page_html.rule=Path(`/503.html`)
256-
- traefik.http.routers.traefik_error_page_html.tls=false
257-
- traefik.http.routers.traefik_error_page_html.service=traefik_error_page_html
258-
- traefik.http.services.traefik_error_page_html.loadbalancer.server.port=80 # nginx port for (non-api) http
259-
260-
# rule to serve custom 503 error json page
261-
- traefik.http.routers.traefik_error_page_json.entrypoints=http
262-
- traefik.http.routers.traefik_error_page_json.priority=1
263-
- traefik.http.routers.traefik_error_page_json.rule=Path(`/503.json`)
264-
- traefik.http.routers.traefik_error_page_json.tls=false
265-
- traefik.http.routers.traefik_error_page_json.service=traefik_error_page_json
266-
- traefik.http.services.traefik_error_page_json.loadbalancer.server.port=8000 # nginx port for (non-api) http
267-
268224
configs:
269225
traefik_dynamic_config.yml:
270226
name: {{ STACK_NAME }}_traefik_dynamic_config_{{ "./traefik_dynamic_config.yml" | sha256file | substring(0,10) }}
271227
file: ./traefik_dynamic_config.yml
272-
{{ STACK_NAME }}_503_web_html:
273-
file: ./config/error_pages/503.html
274-
name: {{ STACK_NAME }}_web_html_{{ "./config/error_pages/503.html" | sha256file | substring(0,10) }}
275-
{{ STACK_NAME }}_503_api_json:
276-
file: ./config/error_pages/503.json
277-
name: {{ STACK_NAME }}_api_json_{{ "./config/error_pages/503.json" | sha256file | substring(0,10) }}
278-
{{ STACK_NAME }}_nginx_error_pages_config:
279-
file: ./config/error_pages/default.conf
280-
name: {{ STACK_NAME }}_web_nginx_config_{{ "./config/error_pages/default.conf" | sha256file | substring(0,10) }}
281228

282229
networks:
283230
public:

0 commit comments

Comments
 (0)