Closed Jehu closed 7 years ago
@Jehu Is unison on your host machine outputting an error? Can you tail the docker logs and share what the image is showing?
Hi, I have the same issue, my special directory is: /var/www/htdocs
logs
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 8
./run: 3: cd: can't cd to /var/www/htdocs
Jul 30 17:21:33 55cb620b097c syslog-ng[15]: syslog-ng starting up; version='3.5.3'
docker-compose.yml
web:
build: .
ports:
- "80:80"
links:
- mysql
env_file:
- env
volumes_from:
- unison
mysql:
image: mysql:5.6.23
env_file:
- env
unison:
image: leighmcculloch/unison:latest
environment:
- UNISON_WORKING_DIR=/var/www/htdocs
- WORKDIR=/var/www/htdocs
ports:
- "5000:5000"
Someone know how keep sync my Magento folder whit Unison?
thanks in advance,
This line surprises me:
./run: 3: cd: can't cd to /var/www/htdocs
That directory should exist because it will be stated as a VOLUME
in the Dockerfile
, but possibly I'm misinterpreting how this works because VOLUME
has been set already when the docker image was built.
I don't think setting the WORKDIR
environment variable is necessary or will change anything. The UNISON_WORKING_DIR
is the directory that unison is executed in, and it syncs to that directory. It's possible that because that doesn't change in the dockerfile since it's already built, that the VOLUME
directive isn't creating the directory, and that's the only step that's missing.
I'll release a version that makes the directory specifically and I think that's going to resolve this.
@Jehu @jujes Turns out the README is misleading and you just need to add an extra argument/config to make it work. I've updated the readme in 286ff02ff02b9502aa07c3d0a1f6f17dbd2af61a to clear this up. Can you try that and confirm that it resolves the issue for you?
i try to figure out how to sync /var/www/html from this image.
I use docker-compose with a docker-compose.yml like this:
But after the command
unison /Users/marco/path/to/my/project/www/ socket://localhost:5000/ -ignore 'Path .git' -auto -batch
the /var/www/html inside the web container is empty