diff --git a/changeurl.sql b/changeurl.sql new file mode 100644 index 0000000..e713042 --- /dev/null +++ b/changeurl.sql @@ -0,0 +1,6 @@ + SET @old_URL = 'https://www.landleben-linum.de'; + SET @new_URL = 'http://localhost:8080'; + + UPDATE wp_options SET option_value = replace(option_value, @old_URL, @new_URL) WHERE option_name = 'home' OR option_name = 'siteurl'; + UPDATE wp_posts SET guid = replace(guid, @old_URL, @new_URL); + UPDATE wp_posts SET post_content = replace(post_content, @old_URL, @new_URL); \ No newline at end of file diff --git a/pod.yaml b/pod.yaml index 1a7de0e..3612f38 100644 --- a/pod.yaml +++ b/pod.yaml @@ -7,13 +7,13 @@ kind: Pod metadata: creationTimestamp: "2023-12-06T16:18:35Z" labels: - app: froxlor - name: froxlor + app: landleben-linum + name: landleben-linum spec: containers: - args: - supervisord - image: localhost/php-nginx-kmmportal:latest + image: localhost/php7.4-nginx:latest name: froxlor-nginx-php ports: - containerPort: 3306 @@ -25,39 +25,39 @@ spec: runAsUser: 999 volumeMounts: - mountPath: /app - name: home-do-git-php-Froxlor-host-0 + name: home-do-git-php-landleben-linum-host-0 - mountPath: /etc/nginx/nginx.conf - name: home-do-git-php-Froxlor-podman-nginx.conf-host-1 + name: home-do-git-php-landleben-linum-podman-nginx.conf-host-1 - args: - mariadbd env: - name: MARIADB_ROOT_PASSWORD value: rootpW image: docker.io/library/mariadb:latest - name: froxlor-mariadb + name: landleben-linum-mariadb securityContext: runAsGroup: 999 runAsUser: 999 volumeMounts: - mountPath: /etc/mysql/conf.d - name: home-do-git-php-Froxlor-podman-mariadb.d-host-0 + name: home-do-git-php-landleben-linum-podman-mariadb.d-host-0 - mountPath: /var/lib/mysql - name: froxlor-mariadb-pvc + name: landleben-linum-mariadb-pvc hostUsers: false volumes: - hostPath: - path: /home/do/git/php/Froxlor-podman/nginx.conf + path: /home/do/git/landleben-linum/podman/nginx.conf type: File - name: home-do-git-php-Froxlor-podman-nginx.conf-host-1 + name: home-do-git-php-landleben-linum-podman-nginx.conf-host-1 - hostPath: - path: /home/do/git/php/Froxlor-podman/mariadb.d + path: /home/do/git/landleben-linum/podman/mariadb.d type: Directory - name: home-do-git-php-Froxlor-podman-mariadb.d-host-0 - - name: froxlor-mariadb-pvc + name: home-do-git-php-landleben-linum-podman-mariadb.d-host-0 + - name: landleben-linum-mariadb-pvc persistentVolumeClaim: - claimName: froxlor-mariadb + claimName: landleben-linum-mariadb - hostPath: - path: /home/do/git/php/Froxlor + path: /home/do/git/landleben-linum/landleben-linum.de type: Directory - name: home-do-git-php-Froxlor-host-0 + name: home-do-git-php-landleben-linum-host-0 diff --git a/update-database.sh b/update-database.sh new file mode 100755 index 0000000..66b20a8 --- /dev/null +++ b/update-database.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +echo "Dumping DB...." +ssh mstiller@maketank.net mysqldump -C --result-file=/tmp/mstillersql1.sql mstillersql1 +echo "Copying here" +scp -C mstiller@maketank.net:/tmp/mstillersql1.sql /tmp/ +echo 'Dropping local' +mariadb --skip-ssl -u root -h localhost --password=rootpW --port=3306 \ + -e 'drop database mstillersql1; create database mstillersql1' +echo 'Importing new...' +mariadb --skip-ssl -u root -h localhost --password=rootpW --port=3306 \ + mstillersql1