nginx grundkonfiguration
This commit is contained in:
parent
6d8a33dcda
commit
4dea5997f6
6 changed files with 69 additions and 2 deletions
|
|
@ -1 +0,0 @@
|
|||
test 2asdfasdfasdfasdf
|
||||
|
|
@ -1 +0,0 @@
|
|||
hier kommt nginxasdfasdf
|
||||
32
nginx/README.md
Normal file
32
nginx/README.md
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# infra-int01
|
||||
|
||||
Basis-Setup fuer den internen nginx auf `infra-int01`.
|
||||
|
||||
## Ziel
|
||||
|
||||
Diese Instanz dient als schlanker interner nginx auf `infra-int01`.
|
||||
Der erste Stand liefert nur eine statische Testseite aus.
|
||||
Reverse-Proxy-Eintraege werden spaeter separat ergaenzt.
|
||||
|
||||
## Struktur
|
||||
|
||||
```text
|
||||
infra-int01/
|
||||
├── compose.yaml
|
||||
├── README.md
|
||||
├── nginx/
|
||||
│ ├── conf.d/
|
||||
│ │ └── default.conf
|
||||
│ ├── html/
|
||||
│ │ └── index.html
|
||||
│ └── proxy/
|
||||
│ └── README.md
|
||||
|
||||
|
||||
Voraussetzungen
|
||||
|
||||
Auf infra-int01 muessen vorhanden sein:
|
||||
|
||||
Docker
|
||||
Docker Compose Plugin
|
||||
geklontes Repo unter /srv/infra-int01/repo/infra-int01
|
||||
15
nginx/compose.yaml
Normal file
15
nginx/compose.yaml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
services:
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: nginx
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- /srv/infra-int01/repo/infra-int01/nginx/conf.d:/etc/nginx/conf.d:ro
|
||||
- /srv/infra-int01/repo/infra-int01/nginx/html:/usr/share/nginx/html:ro
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1/ || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
12
nginx/conf.d/default.conf
Normal file
12
nginx/conf.d/default.conf
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
|
||||
access_log /dev/stdout;
|
||||
error_log /dev/stderr warn;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
}
|
||||
}
|
||||
10
nginx/html/index.html
Normal file
10
nginx/html/index.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<!doctype html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>infra-int01 nginx</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>nginx auf infra-int01 läuft</h1>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue