Add docs service
This commit is contained in:
parent
74aac35930
commit
1027655201
2
nginxs/docs/.env.example
Normal file
2
nginxs/docs/.env.example
Normal file
@ -0,0 +1,2 @@
|
||||
DATA_PATH=
|
||||
CN=
|
6
nginxs/docs/Dockerfile
Normal file
6
nginxs/docs/Dockerfile
Normal 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;"]
|
30
nginxs/docs/docker-compose.yml
Normal file
30
nginxs/docs/docker-compose.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user