commit 94e94ac55348bcf3d79d35126de39cba9aee69ae Author: Udo Waechter Date: Wed Jan 24 12:44:58 2024 +0100 initial diff --git a/.project b/.project new file mode 100644 index 0000000..55a0e11 --- /dev/null +++ b/.project @@ -0,0 +1,11 @@ + + + podman + + + + + + + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..18c6578 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ + +* podman pod create --publish 8080:80,3306:3306 --userns keep-id:uid=1000,gid=1000 --userns keep-id:uid=33,gid=33 landleben-linum +* podman volume create froxlor-mariadb + + +* podman run --restart=always --replace --name=froxlor-nginx-php -v /home/do/git/php/Froxlor:/app -v /home/do/git/php/Froxlor-podman/nginx.conf:/etc/nginx/nginx.conf --pod=froxlor localhost/php-nginx-kmmportal:latest +* podman run -d --restart=always --replace --name=landleben-linum-mariadb --pod=landleben-linum -e MARIADB_ROOT_PASSWORD=rootpW -v /home/do/git/landleben-linum/podman/mariadb.d:/etc/mysql/conf.d -v landleben-linum-mariadb:/var/lib/mysql mariadb:latest + + + diff --git a/mariadb.d/zz_local.cnf b/mariadb.d/zz_local.cnf new file mode 100644 index 0000000..aa797b1 --- /dev/null +++ b/mariadb.d/zz_local.cnf @@ -0,0 +1,35 @@ +[mariadb] +#innodb_buffer_pool_instances = 2 +innodb_buffer_pool_size = 2509690060 +#innodb_buffer_pool_size = 2.9G +innodb_checksum_algorithm = crc32 +innodb_file_per_table = 1 +innodb_flush_log_at_trx_commit = 0 +innodb_lock_wait_timeout = 25 +innodb_log_buffer_size = 32M +#innodb_log_file_size = 836563353 +innodb_log_file_size = 640M +innodb_read_io_threads = 8 +innodb_spin_wait_delay = 24 +innodb_strict_mode = 1 +innodb_sync_spin_loops = 200 +innodb_write_io_threads = 8 +innodb_default_row_format = 'DYNAMIC' +innodb_strict_mode=OFF +[mysqld] +max_allowed_packet = 512M +join_buffer_size = 2097152 +max_connections = 200 +optimizer_search_depth = 0 +query_cache_limit = 836563353 +query_cache_size = 64M +table_open_cache = 16384 +tmp_table_size = 96M +max_heap_table_size = 96M +performance_schema = ON +wait_timeout = 3600 +connect_timeout = 120 +net_read_timeout=3600 +net_write_timeout=3600 +interactive_timeout=3600 + diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..0ef53a6 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,33 @@ +user www-data; +worker_processes auto; + +error_log /docker.stdout notice; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /docker.stdout main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + proxy_intercept_errors on; + fastcgi_intercept_errors on; + include /etc/nginx/conf.d/*.conf; +} + diff --git a/pod.yaml b/pod.yaml new file mode 100644 index 0000000..1a7de0e --- /dev/null +++ b/pod.yaml @@ -0,0 +1,63 @@ +# Save the output of this file and use kubectl create -f to import +# it into Kubernetes. +# +# Created with podman-4.7.2 +apiVersion: v1 +kind: Pod +metadata: + creationTimestamp: "2023-12-06T16:18:35Z" + labels: + app: froxlor + name: froxlor +spec: + containers: + - args: + - supervisord + image: localhost/php-nginx-kmmportal:latest + name: froxlor-nginx-php + ports: + - containerPort: 3306 + hostPort: 3306 + - containerPort: 80 + hostPort: 8080 + securityContext: + runAsGroup: 999 + runAsUser: 999 + volumeMounts: + - mountPath: /app + name: home-do-git-php-Froxlor-host-0 + - mountPath: /etc/nginx/nginx.conf + name: home-do-git-php-Froxlor-podman-nginx.conf-host-1 + - args: + - mariadbd + env: + - name: MARIADB_ROOT_PASSWORD + value: rootpW + image: docker.io/library/mariadb:latest + name: froxlor-mariadb + securityContext: + runAsGroup: 999 + runAsUser: 999 + volumeMounts: + - mountPath: /etc/mysql/conf.d + name: home-do-git-php-Froxlor-podman-mariadb.d-host-0 + - mountPath: /var/lib/mysql + name: froxlor-mariadb-pvc + hostUsers: false + volumes: + - hostPath: + path: /home/do/git/php/Froxlor-podman/nginx.conf + type: File + name: home-do-git-php-Froxlor-podman-nginx.conf-host-1 + - hostPath: + path: /home/do/git/php/Froxlor-podman/mariadb.d + type: Directory + name: home-do-git-php-Froxlor-podman-mariadb.d-host-0 + - name: froxlor-mariadb-pvc + persistentVolumeClaim: + claimName: froxlor-mariadb + - hostPath: + path: /home/do/git/php/Froxlor + type: Directory + name: home-do-git-php-Froxlor-host-0 +