how to migrate from remote spip to docker spip
install spip-cli ~/.local/bin/spip sql:dump:create
copy on local
scp ryogasp.com:/home/ryogasp/ryogasp.com/www/tmp/dump/ryogasp_20200201.sqlite .
copy plugins
from /src/
dir
scp -r ryogasp.com:/home/ryogasp/ryogasp.com/www/plugins ./plugins
(on ububtu 18)
# apt-get install docker nginx
# systemctl enable docker
# adduser ryogasp
# usermod -aG docker ryogasp
# cat /etc/docker/daemon.json
{
"userns-remap": "ryogasp"
}
docker exec -it ryogasp_spip_1 bash cd tmp/dump spip sql:dump:restore --name ryogasp_20200418
if this does not work, create a temporary superadmin
spip auteurs:superadmin
if lang is fucked up, set spip_lang=fr into cookies
server {
server_name ryogasp.com;
access_log /var/log/nginx/ryogasp.vhost.ping.access.log;
error_log /var/log/nginx/ryogasp.vhost.ping.error.log;
listen 80;
listen [::]:80;
location / {
proxy_pass http://localhost:9000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
server {
if ($host = www.ryogasp.com) {
return 301 https://ryogasp.com$request_uri;
}
listen 80;
listen [::]:80;
server_name www.ryogasp.com;
return 404;
}
this will be for next upgrade http://geekyplatypus.com/dockerise-your-php-application-with-nginx-and-php7-fpm/
use certbot to en able https via letsencrypt
apt-get install certbot python-certbot-nginx
certbot --nginx
(todo) put these dir outside the spip root path redefine _DIR_TMP & _DIR_CONNECT constants in mes_options.php