Try more stuff

This commit is contained in:
Micke Nordin 2023-03-29 10:18:20 +02:00
parent 406df9839f
commit 8e302f0213
Signed by untrusted user: Micke
GPG key ID: 0DA0A7A5708FE257
2 changed files with 29 additions and 12 deletions

View file

@ -5,7 +5,6 @@ metadata:
data: data:
000-default.conf: | 000-default.conf: |
LoadModule remoteip_module /usr/lib/apache2/modules/mod_remoteip.so LoadModule remoteip_module /usr/lib/apache2/modules/mod_remoteip.so
Listen 8080
<VirtualHost *:8080> <VirtualHost *:8080>
ServerAdmin webmaster@localhost ServerAdmin webmaster@localhost
DocumentRoot /var/www/html DocumentRoot /var/www/html
@ -21,8 +20,8 @@ data:
RemoteIPInternalProxy 37.156.195.22 RemoteIPInternalProxy 37.156.195.22
# TODO: Package 404 for k8s # TODO: Package 404 for k8s
# ErrorDocument 404 /404.html # ErrorDocument 404 /404.html
# ErrorLog /dev/stderr ErrorLog /dev/stderr
# TransferLog /dev/stdout TransferLog /dev/stdout
<Directory /var/www/html/> <Directory /var/www/html/>
LimitRequestBody 0 LimitRequestBody 0
Require all granted Require all granted
@ -139,3 +138,5 @@ data:
), ),
); );
ports.conf: |
Listen 8080

View file

@ -27,6 +27,12 @@ spec:
app: customer-node app: customer-node
spec: spec:
restartPolicy: Always restartPolicy: Always
securityContext:
privileged: false
runAsNonRoot: true
allowPrivilegeEscalation: false
runAsUser: 33
runAsGroup: 33
containers: containers:
- name: customer - name: customer
image: docker.sunet.se/drive/nextcloud-custom:25.0.3.3-4 image: docker.sunet.se/drive/nextcloud-custom:25.0.3.3-4
@ -37,6 +43,9 @@ spec:
- name: apache-config - name: apache-config
mountPath: /etc/apache2/sites-enabled/000-default.conf mountPath: /etc/apache2/sites-enabled/000-default.conf
subPath: 000-default.conf subPath: 000-default.conf
- name: ports-config
mountPath: /etc/apache2/ports.conf
subPath: ports.conf
resources: resources:
limits: limits:
cpu: 1500m cpu: 1500m
@ -57,7 +66,8 @@ spec:
ports: ports:
- containerPort: 8080 - containerPort: 8080
name: nextcloud-http name: nextcloud-http
command: ['/bin/sh', '-c', '/etc/init.d/apache2 start; tail -f /var/log/apache2/error.log'] command: ["apachectl"]
args: ["-D", "FOREGROUND"]
initContainers: initContainers:
- image: docker.sunet.se/sunet/docker-jinja:latest - image: docker.sunet.se/sunet/docker-jinja:latest
name: init-config name: init-config
@ -175,3 +185,9 @@ spec:
items: items:
- key: "000-default.conf" - key: "000-default.conf"
path: "000-default.conf" path: "000-default.conf"
- name: ports-config
configMap:
name: nextcloud-configmap
items:
- key: "ports.conf"
path: "ports.conf"