docs - reflect kubernetes/swarm changes into the doc

This commit is contained in:
bunkerity
2021-10-21 16:47:08 +02:00
parent 6546a0edb7
commit 2e63bb0256
4 changed files with 99 additions and 110 deletions

View File

@@ -27,7 +27,7 @@ spec:
- name: KUBERNETES_MODE
value: "yes"
- name: DNS_RESOLVERS
value: "kube-dns.kube-system.svc.cluster.local"
value: "coredns.kube-system.svc.cluster.local"
- name: USE_API
value: "yes"
- name: API_URI
@@ -36,15 +36,6 @@ spec:
value: ""
- name: MULTISITE
value: "yes"
volumeMounts:
- name: www
mountPath: /www
readOnly: true
volumes:
- name: www
hostPath:
path: /shared/www
type: Directory
---
apiVersion: v1
kind: Service
@@ -61,6 +52,17 @@ spec:
selector:
name: bunkerized-nginx
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-nginx
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -78,6 +80,30 @@ spec:
app: bunkerized-nginx-autoconf
spec:
serviceAccountName: bunkerized-nginx-ingress-controller
volumes:
- name: vol-nginx
persistentVolumeClaim:
claimName: pvc-nginx
initContainers:
- name: change-data-dir-permissions
command:
- chown
- -R
- 101:101
- /etc/letsencrypt
- /cache
image: busybox
volumeMounts:
- name: vol-nginx
mountPath: /etc/letsencrypt
subPath: letsencrypt
- name: vol-nginx
mountPath: /cache
subPath: cache
securityContext:
runAsNonRoot: false
runAsUser: 0
runAsGroup: 0
containers:
- name: bunkerized-nginx-autoconf
image: bunkerity/bunkerized-nginx-autoconf
@@ -87,10 +113,9 @@ spec:
- name: API_URI
value: "/ChangeMeToSomethingHardToGuess"
volumeMounts:
- name: letsencrypt
- name: vol-nginx
mountPath: /etc/letsencrypt
volumes:
- name: letsencrypt
hostPath:
path: /shared/letsencrypt
type: Directory
subPath: letsencrypt
- name: vol-nginx
mountPath: /cache
subPath: cache

View File

@@ -13,8 +13,6 @@ services:
target: 8443
mode: host
protocol: tcp
volumes:
- /shared/www:/www:ro
environment:
- SWARM_MODE=yes
- USE_API=yes
@@ -38,7 +36,8 @@ services:
image: bunkerity/bunkerized-nginx-autoconf
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /shared/letsencrypt:/etc/letsencrypt
- cache-vol:/cache
- certs-vol:/etc/letsencrypt
environment:
- SWARM_MODE=yes
- API_URI=/ChangeMeToSomethingHardToGuess # must match API_URI from nginx
@@ -60,3 +59,7 @@ networks:
driver: overlay
attachable: true
name: services-net
# And the volumes too
volumes:
cache-vol:
certs-vol: