-
Notifications
You must be signed in to change notification settings - Fork 0
Migration operating mode
kumy edited this page Oct 6, 2017
·
13 revisions
GEOKRETY-LEGACY-REC/
├── configs/
└── vars/
├── generated/
├── logs/
├── mapka/
├── mapki/
| ├─ csv/
| ├─ gpx/
| ├─ map/
├── obrazki/
├── obrazki-dowonu/
├── obrazki-male/
├── rzeczy/
| ├─ xml/
├── statpics/
| ├─ wzory/
└── templates/
├─ cache/
├─ compile/
├─ htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/HTML/
├─ wykresy/
mkdir -p generated/
mkdir -p logs/
mkdir -p mapka/
mkdir -p mapki/csv/
mkdir -p mapki/gpx/
mkdir -p mapki/map/
mkdir -p obrazki/
mkdir -p obrazki-dowonu/
mkdir -p obrazki-male/
mkdir -p rzeczy/xml/
mkdir -p statpics/wzory/
mkdir -p templates/cache/
mkdir -p templates/compile/
mkdir -p templates/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/HTML/
mkdir -p templates/wykresy/
cd GEOKRETY-LEGACY-REC/
git clone [email protected]:geokrety/www.git src
git clone [email protected]:geokrety/geokrety-scripts.git geokrety-scripts
cd GEOKRETY-LEGACY-REC/src
touch templates/konfig-local.php
touch templates/konfig-mysql.php
Edit files and adapt.
cd GEOKRETY-LEGACY-REC/src
touch templates/konfig-local.php
touch templates/konfig-mysql.php
TODO #1 insert script name here
All files inside ./vars must be writable by the webserver. In the current image, www-data has id 33. So set owner as 33 or make directories writable for everyone.
chown -R 33.33 GEOKRETY-LEGACY-REC/vars/*
Create file public_html/.htaccess
RewriteEngine On
RewriteRule ^(.*)$ https://prod.gk.kumy.org/ [R=301]
# On oldsrv:
cd ~/zzz_kumy
mysqldump -ugeokrety -p geokrety --default-character-set=latin1 -r geokrety-latin1.dump
scp geokrety-latin1.dump tr1.sys.kumy.org:~/GEOKRETY-LEGACY-REC/
# On newsrv:
cd ~/GEOKRETY-LEGACY-REC/
sed -i '/SET NAMES latin1/d' geokrety-latin1.dump
docker cp geokrety-latin1.dump mariadb:/tmp/
docker exec -it mariadb bash
mysql -ugeokrety-legacy-rec -p --default-character-set=utf8 geokrety-legacy-rec
mysql> SET names 'utf8'
mysql> SOURCE /tmp/geokrety-latin1.dump
Change dns to point to the new server
geokrety.org. 3600 IN CNAME prod.gk.kumy.org.
edit traefik.toml, uncomment geokrety.org lines