Giter Site home page Giter Site logo

leighmcculloch / docker-unison Goto Github PK

View Code? Open in Web Editor NEW
167.0 10.0 26.0 4.84 MB

A docker data container using Unison for fast folder sync. An alternative to slow boot2docker volumes on OS X.

License: GNU General Public License v3.0

Shell 43.23% Makefile 21.62% Dockerfile 35.15%

docker-unison's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-unison's Issues

Unclear documentation (Readme)

What does this mean?:

You can then sync a local folder to /unison in the container with:

$ unison . socket://<docker>:5000/ -auto -batch

Can you give an example? I blindly copy and pasted the command and of course I get:
bash: docker: No such file or directory

The image is very big

The image is 500MB. It's just feel wrong that the biggest images I run is an image for unison service.

What are the reason to use phusion/baseimage? How I understood phusion/baseimage image is great for running multipprocess.

Their is very smaller images running unison: https://github.com/onnimonni/docker-unison

Fatal error: Lost connection with the server

I just tried this out and while the initial file sync using unison seems to work, at some point, subsequent ones start to fail due to a lost connection with the server error:

Contacting server...
Looking for changes
  Waiting for changes from server                                       
Reconciling changes
         <---- new dir    .sass-cache/73518faaa7ed96cd1457d21e3debf149fba1a055  
changed  ---->            _drafts/foo.md  
Propagating updates
UNISON 2.48.3 started propagating changes at 18:36:37.74 on 06 May 2015
[BGN] Copying .sass-cache/73518faaa7ed96cd1457d21e3debf149fba1a055 from //fb6abd0fdb11//unison to /Users/brikis98/foo
[BGN] Updating file _drafts/foo.md from /Users/brikis98/foo to //fb6abd0fdb11//unison
Fatal error: Lost connection with the server
  4%  00:00 ETAbrikis98-pro:foo

Any idea what's causing that? The container still seems to be running:

brikis98-pro:foo brikis98$ docker ps -a
CONTAINER ID        IMAGE                                   COMMAND             CREATED             STATUS                        PORTS                    NAMES
fb6abd0fdb11        leighmcculloch/unison:latest            "/sbin/my_init"     27 minutes ago      Up 27 minutes                 0.0.0.0:5000->5000/tcp   unison-container    

Doesn't seems to improve speed

Maybe I'm doing all wrong, I don't know, I'm trying to use this project with Dinghy in Mac, with the following docker-compose.yml

project:
  build: .
  dockerfile: ./Dockerfile.app
  expose:
    - "9000"
    - "9001"
  links:
    - redis
  container_name: app
  volumes:
    - /Users/roberto.briones/Documents/project:/var/www/project
  volumes_from:
    - unison

redis:
  image: redis:3.0.6
  container_name: cache
  ports:
    - "6379:6379"

webserver:
  build: .
  dockerfile: ./Dockerfile.nginx
  ports:
    - "80:80"
    - "443:443"
  container_name: nginx
  links:
    - project
  volumes:
    - ./logs/nginx:/var/log/nginx
  volumes_from:
    - project:ro

unison:
  image: leighmcculloch/unison:latest
  environment:
    - UNISON_WORKING_DIR=/unison
  volumes:
    - /unison
  ports:
    - "5000:5000"

My symfony project is in /Users/roberto.briones/Documents/project and that's the folder that I want to speed up, I follow the steps in the README but I don't know if my configuration is correct, also maybe this project is instead of using Dinghy, can anyone give me a hand with this?

unison hostname issue

Hi,

getting:

local$ Warning: No archive files were found for these roots, whose canonical names are:
    /.../app/test.pd
    //f4b6fa0a348d//unison/app/test.pd
This can happen either
because this is the first time you have synchronized these roots,
or because you have upgraded Unison to a new version with a different
archive format.

Update detection may take a while on this run if the replicas are
large.

Unison will assume that the 'last synchronized state' of both replicas
was completely empty.  This means that any files that are different
will be reported as conflicts, and any files that exist only on one
replica will be judged as new and propagated to the other replica.
If the two replicas are identical, then no changes will be reported.

If you see this message repeatedly, it may be because one of your machines
is getting its address from DHCP, which is causing its host name to change
between synchronizations.  See the documentation for the UNISONLOCALHOSTNAME
environment variable for advice on how to correct this.

Donations to the Unison project are gratefully accepted:
http://www.cis.upenn.edu/~bcpierce/unison

Any ideas on the solution for this in with the docker image?
Thanks

Macosx Sierra - unison version 2.48.4 & ocaml 4.0.3

In mac osx Sierra brew installs unison version 2.48.4 & ocaml 4.0.3. I already tried to change Dockerfile in order to change versions with no success. Probably there is something I miss. How easy is it to have a version of docker-unison image build with these versions?
Thanks for the nice work

Use -repeat watch option

at README.md

You could combine it with fswatch to sync automatically when files change:
$ fswatch -o . | xargs -n1 -I{} unison . socket://:5000/ -ignore 'Path .git' -auto -batch

Unison has "-repeat watch" option to sync automatically files.
This option doesn't need fswatch.

Bi-directional sync not working?

I'm able to bidirectionally sync by running unison . socket://<docker>:5000/ -ignore 'Path .git' -auto -batch

However, that doesn't stay alive (obviously). What does stay alive is fswatch -o . | xargs -n1 -I{} unison . socket://<docker>:5000/ -ignore 'Path .git' -auto -batch because fswatch stays alive.

So, if I create a file on my docker instance, how do I automatically sync it back to my Mac? Do I need to add a custom RUN command to a custom docker-unison Dockerfile to tell it to also fswatch -o . | xargs -n1 -I{} unison . socket://<docker>:5000/ -ignore 'Path .git' -auto -batch?

`/unison` initial state

I don't completely understand how to get unison to work at boot time. I'm trying to keep my source folder syncing from local to container. When container starts, it expects the source to be there already. README suggests and my quick test confirms, that upon boot of the container, /unison is empty and needs to be synced to.

What is the suggested to way to work in this scenario? I feel this is a pretty standard setup.

sync a special directory inside of webserver container

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:

version: '2'
services:
  web:
    image: drupaldocker/php:apache
    volumes_from:
        - unison
    ports:
      - "8080:80"
    links:
      - db
    depends_on:
      - unison
      - db
      - solr
  db:
    image: bitnami/mariadb
    environment:
      MARIADB_DATABASE: drupal
      MARIADB_PASSWORD: rootroot
    ports:
      - "3306:3306"
  unison:
    image: leighmcculloch/unison
    environment:
      - UNISON_VERSION=2.48.3
      - UNISON_WORKING_DIR=/var/www/html
      - WORKDIR=/var/www/html
    ports:
      - "5000:5000"
  solr:
      image: mxr576/apachesolr-5.x-drupal-docker
      ports:
        - 8983:8983
      environment:
        PARTIAL_SEARCH_ENABLED: 'true'

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

is this still alive?

hi,

is this project still works?
i ran into problem during sync

Failed: Error in creating directory:
No space left on device [mkdir(/unison/.unison.tmp.3cc49acfc065335c9e57ccd800936d36.unison.tmp/cache/assets/sprockets)]
 75%  00:13 ETAFailed [tmp]: Error in creating directory:
No space left on device [mkdir(/unison/.unison.tmp.3cc49acfc065335c9e57ccd800936d36.unison.tmp/cache/assets/sprockets)]
Failed: Error in closing files:
No space left on device
 75%  00:13 ETAFailed [spec]: Error in closing files:
No space left on device
Failed: Error in closing files:
No space left on device
 75%  00:13 ETAFailed [test]: Error in closing files:
No space left on device
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.