koken / docker-koken-lemp

Docker image for Koken. Uses Ubuntu, nginx, MySQL, and PHP 5.
MIT License
101 stars 43 forks source link

Move from one server to another #11

Open csu opened 8 years ago

csu commented 8 years ago

I've spent hours trying to move a Koken container from one server running Docker to another. Any ideas on how to get this to work? I've tried:

  1. Copying the host directories over and using them as data volumes, creating a new container
  2. Using a host directory for a data volume for nginx while using a mysqldump + restore for MySQL

I've gotten to the point where the website appears, but all the images just show the loading animation. I've tried deleting the cache/api folder as well as setting permissions for the entire cache folder recursively to 777. I've tried clearing all caches from the admin area.

stuhol commented 7 years ago

I'm also having this problem. Did you manage to get it working? I can't seem to find any useful logs either.

stuhol commented 7 years ago

OK got it working.

I copied over the koken/www and koken/mysql folders with preserving numeric user IDs and permissions.

rsync -avPh --numeric-ids <source> <dest>

Then discovered although the site started to load, it wouldn't load images or other pages. I then noticed I was getting an API Error in the site preview on the admin panel.

Looking through https://github.com/koken/docker-koken-lemp/issues/12 I saw a suggestion to add:

define('LOOPBACK_HOST_HEADER', true); to /usr/share/nginx/www/storage/configuration/user_input.php

Restart the container and works a treat.