mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
110 lines
No EOL
1.9 KiB
YAML
110 lines
No EOL
1.9 KiB
YAML
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: ingress
|
|
annotations:
|
|
bunkerweb.io/AUTO_LETS_ENCRYPT: "yes"
|
|
bunkerweb.io/LIMIT_REQ_URL_1: "/core/install.php"
|
|
bunkerweb.io/LIMIT_REQ_RATE_1: "5r/s"
|
|
spec:
|
|
rules:
|
|
- host: www.example.com
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: svc-drupal
|
|
port:
|
|
number: 80
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: cfg-bunkerweb-drupal-modsec-crs
|
|
annotations:
|
|
bunkerweb.io/CONFIG_TYPE: "modsec-crs"
|
|
bunkerweb.io/CONFIG_SITE: "www.example.com"
|
|
data:
|
|
drupal: |
|
|
SecAction \
|
|
"id:900130,\
|
|
phase:1,\
|
|
nolog,\
|
|
pass,\
|
|
t:none,\
|
|
setvar:tx.crs_exclusions_drupal=1"
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: drupal
|
|
labels:
|
|
app: drupal
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: drupal
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: drupal
|
|
spec:
|
|
containers:
|
|
- name: drupal
|
|
image: drupal:9-apache
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: svc-drupal
|
|
spec:
|
|
selector:
|
|
app: drupal
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 80
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: db
|
|
labels:
|
|
app: db
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: db
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: db
|
|
spec:
|
|
containers:
|
|
- name: db
|
|
image: mariadb
|
|
env:
|
|
- name: MYSQL_ROOT_PASSWORD
|
|
value: db-root-pwd
|
|
- name: MYSQL_DATABASE
|
|
value: drupaldb
|
|
- name: MYSQL_USER
|
|
value: user
|
|
- name: MYSQL_PASSWORD
|
|
value: db-user-pwd
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: svc-db
|
|
spec:
|
|
selector:
|
|
app: db
|
|
ports:
|
|
- protocol: TCP
|
|
port: 3306
|
|
targetPort: 3306 |