-
Notifications
You must be signed in to change notification settings - Fork 2
/
template.yml
72 lines (72 loc) · 1.73 KB
/
template.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
apiVersion: v1
kind: Pod
metadata:
name: traefik
labels:
app: traefik
spec:
restartPolicy: Always
containers:
- image: docker.io/library/traefik:v3.0
name: traefik
ports:
- containerPort: 80
hostPort: 80
protocol: TCP
- containerPort: 8080
hostPort: 8070
protocol: TCP
volumeMounts:
- mountPath: /var/run/docker.sock:z
name: run-user-podman.sock
- mountPath: /etc/traefik/traefik.yml
name: traefik-config
readOnly: true
volumes:
- hostPath:
path: ${XDG_RUNTIME_DIR}/podman/podman.sock
type: File
name: run-user-podman.sock
- hostPath:
path: ./traefik.yml
type: File
name: traefik-config
---
apiVersion: v1
kind: Pod
metadata:
name: homepage
labels:
app: homepage
traefik.enable: true
traefik.http.routers.homepage.rule: PathPrefix(`/`)
traefik.http.routers.homepage.entrypoints: web
traefik.http.routers.homepage.middlewares: strip-homepage-prefix
traefik.http.services.homepage.loadbalancer.server.port: 80
traefik.http.middlewares.strip-homepage-prefix.stripPrefix.prefixes: /
spec:
restartPolicy: Always
containers:
- name: homepage
image: docker.io/library/nginx:latest
command: ["/bin/sh", "-c"]
args:
- |
chmod -R 755 /usr/share/nginx/html;
chown -R nginx:nginx /usr/share/nginx/html;
nginx -g 'daemon off;'
volumeMounts:
- mountPath: /usr/share/nginx/html
name: apppo-html
- mountPath: /etc/nginx/conf.d/default.conf
name: apppo-default.conf
dnsPolicy: Default
volumes:
- hostPath:
path: ./html
type: Directory
name: apppo-html
- hostPath:
path: ./default.conf
type: File
name: apppo-default.conf