Introduce new forum pod

This commit is contained in:
2024-11-24 01:02:38 +07:00
parent 98a3fce3b6
commit 33cc710e1a
2 changed files with 48 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ server {
location ~ \.php$ { location ~ \.php$ {
try_files $uri =404; try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass rock-php-fpm:9000; fastcgi_pass php-fpm-forum:9000;
fastcgi_index index.php; fastcgi_index index.php;
include fastcgi_params; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

47
k8s/app/forum.yml Normal file
View File

@@ -0,0 +1,47 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: php-fpm-forum
namespace: rock
labels:
app: php-fpm-forum
spec:
replicas: 3
selector:
matchLabels:
app: php-fpm-forum
template:
metadata:
labels:
app: php-fpm-forum
spec:
volumes:
- name: attachments
hostPath:
path: /srv/data/img/forum/attachments
containers:
- name: php
image: git.picklesniffers.com/rock.ru/forum:0.2.6
volumeMounts:
- name: attachments
mountPath: /var/www/rock/forum/attachments
ports:
- containerPort: 9000
env:
- name: TZ
value: "Asia/Bangkok"
---
apiVersion: v1
kind: Service
metadata:
name: php-fpm-forum
namespace: rock
spec:
selector:
app: php-fpm-forum
ports:
- protocol: TCP
port: 9000
targetPort: 9000