parent
8e91a5a3ee
commit
a6226321cb
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<title></title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Co-op Cloud, 404 Hello World!</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
1
abra.sh
1
abra.sh
|
@ -1,3 +1,4 @@
|
||||||
export TRAEFIK_YML_VERSION=v12
|
export TRAEFIK_YML_VERSION=v12
|
||||||
export FILE_PROVIDER_YML_VERSION=v3
|
export FILE_PROVIDER_YML_VERSION=v3
|
||||||
export ENTRYPOINT_VERSION=v2
|
export ENTRYPOINT_VERSION=v2
|
||||||
|
export NGINX_CONFIG_VERSION=v1
|
||||||
|
|
27
compose.yml
27
compose.yml
|
@ -49,6 +49,26 @@ services:
|
||||||
- "traefik.http.routers.traefik.middlewares=security@file"
|
- "traefik.http.routers.traefik.middlewares=security@file"
|
||||||
- "coop-cloud.${STACK_NAME}.version=1.0.0+v2.5.2"
|
- "coop-cloud.${STACK_NAME}.version=1.0.0+v2.5.2"
|
||||||
|
|
||||||
|
web:
|
||||||
|
image: nginx:1.20.0
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
configs:
|
||||||
|
- source: global_404
|
||||||
|
target: /usr/share/nginx/error-pages/404.html
|
||||||
|
- source: nginx_config
|
||||||
|
target: /etc/nginx/nginx.conf
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.services.error-pages-service.loadbalancer.server.port=80"
|
||||||
|
- "traefik.http.routers.error-router.rule=HostRegexp(`{host:.+}`)"
|
||||||
|
- "traefik.http.routers.error-router.entrypoints=web"
|
||||||
|
- "traefik.http.routers.error-route.priority=1"
|
||||||
|
- "traefik.http.routers.error-router.middlewares=error-pages-middleware"
|
||||||
|
- "traefik.http.middlewares.error-pages-middleware.errors.status=404"
|
||||||
|
- "traefik.http.middlewares.error-pages-middleware.errors.service=error-pages-service"
|
||||||
|
- "traefik.http.middlewares.error-pages-middleware.errors.query=/{status}.html"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxy:
|
proxy:
|
||||||
external: true
|
external: true
|
||||||
|
@ -66,6 +86,13 @@ configs:
|
||||||
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
|
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
|
||||||
file: entrypoint.sh.tmpl
|
file: entrypoint.sh.tmpl
|
||||||
template_driver: golang
|
template_driver: golang
|
||||||
|
nginx_config:
|
||||||
|
name: ${STACK_NAME}_nginx_config_${NGINX_CONFIG_VERSION}
|
||||||
|
file: nginx.conf.tmpl
|
||||||
|
template_driver: golang
|
||||||
|
global_404:
|
||||||
|
name: ${STACK_NAME}_global_404_${GLOBAL_404_VERSION}
|
||||||
|
file: 404.html
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
letsencrypt:
|
letsencrypt:
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
user www-data;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 768;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
listen 80;
|
||||||
|
server_name localhost;
|
||||||
|
|
||||||
|
error_page 404 /404.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /usr/share/nginx/error-pages;
|
||||||
|
internal;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue