Add docs service

This commit is contained in:
thopic 2022-01-17 10:01:48 +01:00
parent 74aac35930
commit 1027655201
Signed by: thopic
GPG Key ID: 292DBBF0B54AD4C5
3 changed files with 38 additions and 0 deletions

2
nginxs/docs/.env.example Normal file
View File

@ -0,0 +1,2 @@
DATA_PATH=
CN=

6
nginxs/docs/Dockerfile Normal file
View File

@ -0,0 +1,6 @@
from nginx:1.21.4-alpine
RUN sed -i "/http {/a\ \ \ \ server_tokens off;" /etc/nginx/nginx.conf \
&& sed -i "s/remote_addr/http_x_forwarded_for/g" /etc/nginx/nginx.conf
CMD ["nginx", "-g", "daemon off;"]

View File

@ -0,0 +1,30 @@
version: "3.8"
services:
web:
build: .
image: my_nginx:1.21.4
networks:
- proxy
expose:
- "80"
restart: unless-stopped
volumes:
- ${DATA_PATH}/html/:/usr/share/nginx/html:ro
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.docs-redirect-websecure.redirectscheme.scheme=https"
- "traefik.http.routers.docs-http.middlewares=docs-redirect-websecure"
- "traefik.http.routers.docs-http.rule=Host(`${CN}`)"
- "traefik.http.routers.docs-http.entrypoints=web"
- "traefik.http.routers.docs-https.rule=Host(`${CN}`)"
- "traefik.http.routers.docs-https.entrypoints=websecure"
- "traefik.http.routers.docs-https.tls=true"
- "traefik.http.routers.docs-https.tls.certresolver=myhttpchallenge"
- "co.elastic.logs/module=nginx"
networks:
proxy:
external: true