5 Commits

Author SHA1 Message Date
21fab1e23f php-fpm proper version
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-17 17:38:06 +01:00
45ffac4318 fewer layers in rompr image 2024-01-17 17:32:45 +01:00
e702963a01 all packs again 2024-01-17 17:26:20 +01:00
ca165f5c5e how to run 2024-01-17 17:24:59 +01:00
44ae607709 removed obsolete kubernetes stuff 2024-01-17 17:13:28 +01:00
6 changed files with 15 additions and 109 deletions

View File

@@ -1,7 +1,7 @@
local dirs = ['_CI-CD', 'apps'];
#local packages = ['debian-stable', 'debian-testing', 'debian-stable-build-essential', 'debian-golang', 'debian-stable-php-fpm', 'distcc'];
local packages = ['debian-stable-php-fpm'];
local packages = ['debian-stable'];
#local apps = ['rompr', 'apt-cacher-ng', 'curl', 'mosquitto', 'mosquitto-prometheus-exporter'];
local apps = ['rompr'];

View File

@@ -23,14 +23,14 @@ RUN pwd; ls -la .;ls -la /etc/php/*/fpm
ADD files/nginx_default /etc/nginx/sites-available/default
RUN mkdir -p /run/php/
#Environment variables to configure php
RUN sed -ri -e 's/^allow_url_fopen =.*/allow_url_fopen = On/g' /etc/php/8.2/fpm/php.ini
RUN sed -ri -e 's/^memory_limit =.*/memory_limit = 128M/g' /etc/php/8.2/fpm/php.ini
RUN sed -ri -e 's/^max_execution_time =.*/max_execution_time = 1800/g' /etc/php/8.2/fpm/php.ini
RUN sed -ri -e 's/^post_max_size =.*/post_max_size = 256M/g' /etc/php/8.2/fpm/php.ini
RUN sed -ri -e 's/^upload_max_filesize =.*/upload_max_filesize = 8M/g' /etc/php/8.2/fpm/php.ini
RUN sed -ri -e 's/^max_file_uploads =.*/max_file_uploads = 50/g' /etc/php/8.2/fpm/php.ini
RUN sed -ri -e 's/^display_errors =.*/display_errors = On/g' /etc/php/8.2/fpm/php.ini
RUN sed -ri -e 's/^display_startup_errors =.*/display_startup_errors = On/g' /etc/php/8.2/fpm/php.ini
RUN sed -ri -e 's/^allow_url_fopen =.*/allow_url_fopen = On/g' /etc/php/8.2/fpm/php.ini && \
sed -ri -e 's/^memory_limit =.*/memory_limit = 128M/g' /etc/php/8.2/fpm/php.ini && \
sed -ri -e 's/^max_execution_time =.*/max_execution_time = 1800/g' /etc/php/8.2/fpm/php.ini && \
sed -ri -e 's/^post_max_size =.*/post_max_size = 256M/g' /etc/php/8.2/fpm/php.ini && \
sed -ri -e 's/^upload_max_filesize =.*/upload_max_filesize = 8M/g' /etc/php/8.2/fpm/php.ini && \
sed -ri -e 's/^max_file_uploads =.*/max_file_uploads = 50/g' /etc/php/8.2/fpm/php.ini && \
sed -ri -e 's/^display_errors =.*/display_errors = On/g' /etc/php/8.2/fpm/php.ini && \
sed -ri -e 's/^display_startup_errors =.*/display_startup_errors = On/g' /etc/php/8.2/fpm/php.ini
RUN echo "<?php phpinfo(); ?>" > /app/rompr/phpinfo.php
RUN update-rc.d php8.2-fpm defaults

View File

@@ -1,3 +1,5 @@
lighttpd is configured in etc_lighttpd
generate a configmap with:
kubectl create configmap rompr-lighttpd-config --from-file etc_lighthttpd/
Run with:
```podman run --pull=always -d --replace -p 127.0.0.1:8081:80 \
--mount=type=bind,source=/var/lib/rompr,destination=/rompr \
--tz=Europe/Berlin --name=rompr cr.wks/rompr:latest```

View File

@@ -1,73 +0,0 @@
---
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: rompr
spec:
selector:
matchLabels:
app: rompr
strategy:
type: Recreate
template:
metadata:
labels:
app: rompr
spec:
containers:
- image: cr.lan/rompr
name: rompr
imagePullPolicy: Always
ports:
- containerPort: 80
name: http
volumeMounts:
- name: rompr-data
mountPath: /rompr
volumes:
- name: rompr-data
persistentVolumeClaim:
claimName: rompr-data
---
apiVersion: v1
kind: Service
metadata:
name: rompr
spec:
ports:
- name: http
port: 80
selector:
app: rompr
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: rompr
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- host: musik.lan
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: rompr
port:
name: http
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: rompr-data
spec:
storageClassName: nfs-ssd
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 6Gi

View File

@@ -4,5 +4,5 @@ mkdir -p /var/log/nginx
set -e
mkdir -p /rompr/albumart /rompr/prefs
chown www-data:www-data -R /rompr/albumart /rompr/prefs
/etc/init.d/php7.4-fpm restart
/etc/init.d/php-fpm restart
exec /usr/sbin/nginx -g 'daemon off;'

View File

@@ -1,23 +0,0 @@
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: build-rompr
spec:
pipelineRef:
name: kaniko-pipeline
params:
- name: git-url
value: http://git-ui.lan/chaos/kubernetes.git
- name: git-revision
value: master
- name: path-to-image-context
value: apps/rompr
- name: path-to-dockerfile
value: ./Dockerfile
- name: image-name
value: cr.lan/rompr
workspaces:
- name: git-source
persistentVolumeClaim:
claimName: tektoncd-workspaces
subPath: tekton/kaniko-pipelines