update scripts
This commit is contained in:
6
changeurl.sql
Normal file
6
changeurl.sql
Normal file
@@ -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);
|
||||
32
pod.yaml
32
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
|
||||
|
||||
|
||||
17
update-database.sh
Executable file
17
update-database.sh
Executable file
@@ -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 </tmp/mstillersql1.sql
|
||||
mariadb --skip-ssl -u root -h localhost --password=rootpW --port=3306 mstillersql1 < changeurl.sql
|
||||
|
||||
echo 'Cleanup'
|
||||
rm /tmp/mstillersql1.sql
|
||||
ssh mstiller@maketank.net rm /tmp/mstillersql1.sql
|
||||
5
update-files.sh
Executable file
5
update-files.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
TARGET='/home/do/git/landleben-linum/landleben-linum.de/'
|
||||
EXCLUDE='--exclude=**/backup-* --exclude=**/backups-dup-lite'
|
||||
rsync -avzC --delete ${EXCLUDE} root@maketank.net:~mstiller/landleben-linum.de/ ${TARGET}
|
||||
Reference in New Issue
Block a user