Coder Social home page Coder Social logo

eugenmayer / docker-sync Goto Github PK

View Code? Open in Web Editor NEW
3.5K 68.0 353.0 2.95 MB

Run your application at full speed while syncing your code for development, finally empowering you to utilize docker for development under OSX/Windows/*Linux

License: GNU General Public License v3.0

Ruby 99.34% Shell 0.54% HTML 0.05% Dockerfile 0.07%
docker-sync docker docker-compose osx macos docker-devops d4m windows linux docker-toolbox

docker-sync's Introduction

Gem Version Build Status

Thank you for all the feedback and support i already received!
Docker-sync has been improved by all of you in huge ways!

Important links:

Docker-sync needs contributions and help

  • Help here if you are a coder
  • Help here with the docs no matter what skill set you have. See the docs/README.md on how to work with the docs.
  • Otherwise, please consider sponsering me a bear via Patreon as an alternative.

Main Contributors:

docker-sync's People

Contributors

cabello avatar deconstrained avatar docx avatar dojohnso avatar donnykurnia avatar dylanscott avatar eelkevdbos avatar eugenmayer avatar floriandr avatar ignatiusreza avatar jerome-arzel avatar kiote avatar kurarrr avatar malagant avatar marmarama avatar masterful avatar michaelbaudino avatar mickaelperrin avatar midn avatar mmrko avatar nalbury-handy avatar ostrolucky avatar ricmatsui avatar rogamoore avatar unnawut avatar vranac avatar wulftone avatar yeuem1vannam avatar yosephsa avatar zessx avatar

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  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

docker-sync's Issues

Create, start and sync containers without without watching

I'd like to be able to create and sync containers, run some cleanup around file permissions stuff and then start watching. Currently creating and starting containers only happens with docker-sync sync, which stops containers when stopped.

Implement managing user/group permission with unison

When I'm using rsync I can fix the permission to www-data but not with unison. Is their a workaround?

I want to use unison to have a two way sync. So for example I can see and edit the drupal config files generated by php.

Allow for docker-sync to run in background and add a docker-sync stop command?

Hi! I'm having great results with this but we use a makefile to script docker environment creation locally, and the blocking UI for docker-sync is not so compatible with that. What about adding a command-line option to docker-sync start to run in the background and then a separate docker-sync stop command to stop the process?

Started, but not syncing unless on restart of docker-sync

I've managed to get docker-sync running and it seems to share the volume data when I initially run docker-sync start, however, after editing anything in the directory that it's watching it doesn't appear to sync any data.

Restarting docker-sync shows a new set of data, but that defeats the purpose of running it once and letting data sync when saved/updated.

Is there possibly a step I'm missing here? I don't have any watch excludes setup and I'm using rsync 3.1.2 on OS X. I don't see any errors in the logs, either.

User stories: Why you need 2 way sync?

Please explain your use case, why you need 2 way sync so i can understand, what use case we are working towards. In my understanding right now, i cannot image a single usecase, but i already have several use-cases against using 2 way sync. I can share those later on

Changes to files inside the host do not trigger a sync (unison)

With a unison sync setup, adding/modifying files within the container does not cause those files to be synced back to the host. The only thing that seems to trigger a sync from the container back to the host is touching a watched file outside of the container.

Is this expected behavior? I had expected 2way sync to automatically detect changes made in either location.

Discuss weather to add --delete to rsync by default

rsync does not use --delete for now, but i worked with that already. I am yet not sure if we should add it to the defaults and make it possible to disable it ( there are some cases were you do not want this, i have such ) or keep the default as such.

Any suggestions?

Memory leak in unison image/container

the docker-sync container (the last one) seem to use a lot of memory after some time:
screen shot 2016-07-13 at 22 05 24

Right after starting memory consumption it's pretty standard but seem to grow very quickly every time their is a sync (just add/delete a empty folder):
screen shot 2016-07-13 at 22 11 05

Crashes: docker-sync-stack start

docker-sync start

works ok.

docker-sync-stack start 

fails.

> docker-sync-stack start
/Library/Ruby/Gems/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose/mapper.rb:105:in `private': nil is not a symbol (TypeError)
    from /Library/Ruby/Gems/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose/mapper.rb:105:in `<class:Mapper>'
    from /Library/Ruby/Gems/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose/mapper.rb:5:in `<module:Compose>'
    from /Library/Ruby/Gems/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose/mapper.rb:2:in `<top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose.rb:10:in `require_relative'
    from /Library/Ruby/Gems/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose.rb:10:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/docker-sync-0.0.13/tasks/stack/stack.thor:5:in `<top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/docker-sync-0.0.13/bin/docker-sync-stack:22:in `load'
    from /Library/Ruby/Gems/2.0.0/gems/docker-sync-0.0.13/bin/docker-sync-stack:22:in `block in <top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/docker-sync-0.0.13/bin/docker-sync-stack:20:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/docker-sync-0.0.13/bin/docker-sync-stack:20:in `<top (required)>'
    from /usr/local/bin/docker-sync-stack:23:in `load'
    from /usr/local/bin/docker-sync-stack:23:in `<main>'

docker-sync clean can't delete volume if they are still in use.

If the docker-sync's volume are still attached to a containers (even stooped), it will not remove those volume:

โžœ  git:(dev) โœ— docker-sync clean
Error response from daemon: No such container: code-sync
Error response from daemon: No such container: code-sync
Error response from daemon: Unable to remove volume, volume still in use: remove code-sync:
volume is in use - [0bf8bf2d470b484fd736cd245134bf75e294bd5eb664625688f649a57d54533c,
a266be7316732935631a3abc834cdf58e438385ff8fd6f201237a23a19a18109]
  success  Finished cleanup. Removed stopped, removed sync container and removed there volumes

I guess this is a safeguard, but what are the use cases as you should still have your files on your local file system.

Perhaps we can add a --force flag. Or a confirmation dialogue can be the default behavior:

โžœ  git:(dev) โœ— docker-sync clean --force
Volume still in use - [0bf8bf2d470b484fd736cd245134bf75e294bd5eb664625688f649a57d54533c,
a266be7316732935631a3abc834cdf58e438385ff8fd6f201237a23a19a18109]

Are you sure you want to delete those volume (y/n): 

Write tests, rubymasters please help!

Its not like i do not write tests, but this here is pretty special. Containers, remote file sync and so on.

Any rubyist available to explain, how this would be done in a considerable amount of time?

Anyone who feels happy to structure the test-idea for this project, please go on!

fails to log output with verbose option

/Users/mickaelperrin/tmp/docker-sync-perso/docker_sync/lib/docker_sync/sync_strategy/unison.rb:49:in `sync': undefined local variable or method `out' for #<Docker_Sync::SyncStrategy::Unison:0x007fc942119b18> (NameError)
from /Users/mickaelperrin/tmp/docker-sync-perso/docker_sync/lib/docker_sync/sync_strategy/unison.rb:94:in `start_container'
from /Users/mickaelperrin/tmp/docker-sync-perso/docker_sync/lib/docker_sync/sync_strategy/unison.rb:32:in `run'
from /Users/mickaelperrin/tmp/docker-sync-perso/docker_sync/lib/docker_sync/sync_process.rb:64:in `run'
from /Users/mickaelperrin/tmp/docker-sync-perso/docker_sync/lib/docker_sync/sync_manager.rb:103:in `block in run'
from /Users/mickaelperrin/tmp/docker-sync-perso/docker_sync/lib/docker_sync/sync_manager.rb:102:in `each'
from /Users/mickaelperrin/tmp/docker-sync-perso/docker_sync/lib/docker_sync/sync_manager.rb:102:in `run'
from /Users/mickaelperrin/tmp/docker-sync-perso/docker_sync/tasks/sync.thor:32:in `start'
from /Users/mickaelperrin/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/mickaelperrin/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/mickaelperrin/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /Users/mickaelperrin/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Users/mickaelperrin/tmp/docker-sync-perso/docker_sync/bin/docker-sync:11:in `<main>'

Make it possible to disable fswatch

Since if there is any ressource consumption, it would be the watcher ( fswatch ) under osx, make it possible to disable any file-watching. Even though this means the user has to either run

docker-sync sync

Himself whenever he wants to sync back or, and thats much more interesting, use IDE tools like file-watchers of e.g. Intellij to fire up the sync whenever you save a file ( of a specific glob ).

Its not a hard deal, just create watch_strategy as a configuration and allo

  • fswatch ( default )
  • none

And create documentation why this is offered and how to utilize the IDE for that. Anyone feels happy, please help writing docs in the wiki :)

Unison: conflict resolution

Sometimes it seem content are changed on both sides. I'm not sure it's actually the case because my IDE settings was definitely not changed on the server side.

Anyway in those case it would be great to be able to resolve the conflict by forcing on side or the other.

That's the errors I get with docker-sync sync

Looking for changes
  Waiting for changes from server
Reconciling changes
Synchronization complete at 10:22:50  (0 item transferred, 6 skipped, 0 failed)
  skipped: .idea/workspace.xml (contents changed on both sides)
  skipped: README.md (contents changed on both sides)
  skipped: web/sites/default/settings.php (contents changed on both sides)
  skipped: web/sites/development.services.yml (contents changed on both sides)
  skipped: web/themes/ehnv/templates/system/page.html.twig (contents changed on both sides)

Implement full-stack start and start compose after docker-sync

Make it even easier to run a dev-stack and not to start several shells and so on

docker-sync start-stack

This should start the sync-services, wait until they are up, then start docker-compose. This means the docker-compose.yml file must be located next to the docker-sync.yml file

troubles with permissions

Hello!
I'm using docker-sync for symfony app. I have problems with user that sync in the container.
in eugenmayer/rsync container user is www-data, in php-fpm container user is xfs with another g_id, so I'm in troubles with permissions.

docker-sync.yml

syncs:
  appcode-sync: 
      src: './../'
      dest: '/var/www'
      sync_host_ip: 'localhost'
      sync_host_port: 10872
      sync_user: 'www-data'
      sync_userid: '1000'
      sync_group: 'www-data'
      sync_groupid: '82'

docker-compose.yml

version: '2'
services:
    db:
        image: mysql:latest
        ports:
            - "3306:3306"
        environment:
            MYSQL_ROOT_PASSWORD: root
            MYSQL_DATABASE: lookaround
            MYSQL_USER: root
            MYSQL_PASSWORD: root
    php:
        build: ./../.docker/php-fpm
        expose:
            - "9000"
        volumes_from:
          - container:appcode-sync # will be mounted on /var/www
        #command: ['watch', '-n3', 'cat /var/www/web/app_dev.php']
        links:
            - db
            - redis
    nginx:
        build: ./../.docker/nginx
        ports:
            - "80:80"
        links:
            - php
        volumes_from:
            - php
        volumes:
            - ./../var/logs/nginx/:/var/log/nginx
    elk:
        image: willdurand/elk
        ports:
            - "81:80"
        volumes:
            - ../.docker/elk/logstash:/etc/logstash
            - ../.docker/elk/logstash/patterns:/opt/logstash/patterns
        volumes_from:
            - php
            - nginx
    redis:
        image: redis:latest
    phan:
        image: cloudflare/phan:latest
        volumes:
            - ./../:/mnt/src

volumes:
    appcode-sync:
        external: true

Permissions issues

Hey @EugenMayer ... first off thanks for making this project, performance has become a real pain for us after moving to docker last week.

I'm not sure if I'm just doing something wrong or what but atm the files are coming through as nobody nogroup and my app loses permissions to write cache etc.

docker-sync.yml

syncs:
  app_vol:
    src: './'
    dest: '/var/www/magento'
    sync_host_ip: 'localhost'
    sync_host_port: 10871
  db_vol:
    src: './.docker/mysql'
    dest: '/var/lib/mysql'
    sync_host_ip: 'localhost'
    sync_host_port: 1087

docker-compose.yml simplyfied

version: '2'
volumes:
    app_vol:
        external: true
    db_vol:
        external: true

services:
    nginx:
        container_name: nginx
        image: nginx:latest
        volumes_from:
            - container:app_vol:rw
        volumes:
#            - "./:/var/www/magento"
            - "./.docker/sites:/etc/nginx/conf.d"
        ports:
            - "80:80"
        links:
            - php
        env_file:
            - ./project.env

    db:
        container_name: db
        image: mysql:5.6
        volumes_from:
              - container:db_vol:rw
        volumes:
#            - "./.docker/mysql:/var/lib/mysql"
            - "./.docker/db/:/docker-entrypoint-initdb.d/"
        ports:
            - "3306:3306"
        restart: always
        env_file:
            - ./project.env

    php:
        container_name: php
        image: mikeymike/docker-php
        volumes_from:
            - container:app_vol:rw
        volumes:
#            - "./:/var/www/magento"
            - "${HOME}/.composer:/root/.composer"
            - "${HOME}/.ssh:/root/.ssh"
        working_dir: /var/www/magento
        ports:
            - 9000
        links:
            - db
        env_file:
            - ./project.env

Any thoughts on this would be awesome :D

Concept 'magic': Think about implementing a OSXFS strategy architecture for 2 way sync

Mentioned here https://forums.docker.com/t/file-access-in-mounted-volumes-extremely-slow-cpu-bound/8076/130?u=eugenmayer

Using OSXFS to sync from host to sync container "tmp folder" and then sync from this tmp folder to sync-container app-folder "locally".

This has some pros:

  • fswatch can be removed on host side, saving ressources and "sync delays" (still we need fswatch on the sync container though )
  • fsevents of the host are bubbling to the VM ( no need for custom implementations, OSXFS implements that )
  • it would be probably easier to implement 2 way sync this way

Cons:
a) still needs 2 fswatch processes : One the the sync container to watch the changes on the tmp folder, one on the app-mount folder in the sync container to get app-container changes on the share
b) docker for mac only and probably OSX only

Comments on the cons:
a) well, thats just the same number as we would have without OSXFS, so its rather on par, but, fswatch is more effective on linux due to inotify evens, so it might gain performance, sind we reduce the fswatch on OSX, shifting it into linux
b) Well we do support OSX with docker-sync yet only ( i guess, not tested on windows ). Secondly, since it would end up being a strategy only, we could say that some strategies are not available for some docker-types like docker-machine and stuff. So thats sovleable


the data flow would look like this
Host --- OSXFS ---> sync-container /tmp[fswatch-trigger]--- local unison sync ---> sync-container /app/code[fswatch-trigger] ----- named volume mount -> app container

add ruby 2.0 dependency

I am trying to start the boilerplate project from here https://github.com/EugenMayer/docker-sync-boilerplate

docker-sync-stack start /Library/Ruby/Gems/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose/mapper.rb:105:inprivate': nil is not a symbol (TypeError)
from /Library/Ruby/Gems/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose/mapper.rb:105:in <class:Mapper>' from /Library/Ruby/Gems/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose/mapper.rb:5:inmodule:Compose'
from /Library/Ruby/Gems/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose/mapper.rb:2:in <top (required)>' from /Library/Ruby/Gems/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose.rb:10:inrequire_relative'
from /Library/Ruby/Gems/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose.rb:10:in <top (required)>' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require' from /Library/Ruby/Gems/2.0.0/gems/docker-sync-0.0.15/tasks/stack/stack.thor:5:in<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/docker-sync-0.0.15/bin/docker-sync-stack:23:in load' from /Library/Ruby/Gems/2.0.0/gems/docker-sync-0.0.15/bin/docker-sync-stack:23:inblock in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/docker-sync-0.0.15/bin/docker-sync-stack:21:in each' from /Library/Ruby/Gems/2.0.0/gems/docker-sync-0.0.15/bin/docker-sync-stack:21:in<top (required)>'
from /usr/local/bin/docker-sync-stack:23:in load' from /usr/local/bin/docker-sync-stack:23:in

'`

Docker for Mac: version: win-beta-v1.12.0-rc5-beta21-68-g5b59d37
OS X: version 10.11.3 (build: 15D21)
logs: /tmp/0D3FC0FD-7C1E-4CF5-9BE7-AA033B364868/20160731-124903.tar.gz
[OK] docker-cli
[OK] app
[OK] moby-syslog
[OK] disk
[OK] virtualization
[OK] system
[OK] menubar
[OK] osxfs
[OK] db
[OK] slirp
[OK] moby-console
[OK] logs
[OK] vmnetd
[OK] env
[OK] moby
[OK] driver.amd64-linux

Thanks for help!

Syncing with unison-dualside is syncing across src directories

Hi there!

First off -- love the amazing work you're doing here. From my research and experience, this is by far the best solution to osxfs performance problems, until Docker for Mac is able to fix for good.

I've noticed that when sync'ing with unison-dualside (not unison), my code effectively gets copied from 1 src folder to a 2nd src folder (quite destructive, in fact).

Sync config:

syncs:
  web-sync:
    src: '../web'
    dest: '/app'
    sync_host_port: 10872
    sync_strategy: 'unison-dualside'
    sync_userid: 'from_host'
    unison-dualside_host_ip: 'auto'
    unison-dualside_host_server_port: 6000
  boxoffice-sync:
    src: '../boxoffice'
    dest: '/app'
    sync_host_port: 10873
    sync_strategy: 'unison-dualside'
    sync_userid: 'from_host'
    unison-dualside_host_ip: 'auto'
    unison-dualside_host_server_port: 6000

Compose Config:

version: '2'
services:
  web:
    build: ../web
    volumes_from:
       - container:web-sync:rw
    expose:
      - 3000
    ports:
      - "3000:3000"
    depends_on:
      - mongodb
      - redis
      - boxoffice
      - kraken
      - geoduck
      - multiverse
      - discover
      - embed
  boxoffice:
    build: ../boxoffice
    volumes_from:
       - container:boxoffice-sync:rw
    expose:
      - 4567
    ports:
      - "4567:4567"
    depends_on:
      - postgresql
volumes:
  web-sync:
    external: true
  boxoffice-sync:
    external: true

Any thoughts on why it's cross-sync'ing here? Thanks a ton!

Poll: Rewrite in golang at some point

Are there any strong feelings against rewriting docker-sync into golang? It has some pros:

  • no dependency on the host ( no ruby needed )
  • Better type support, interfaces, abstract classes .. since we have a strategy patter, it could make sense
  • ?

Cons:

  • probably less people know golang ( but i bet a lot want to start using it :) )
  • missing gems (are there any?)
  • ?

Not functionnal when linked in /usr/local/bin

I made a link from the docker-sync exe to /usr/local/bin

When I run docker-sync sync -n src --config='/path/to/config/docker-sync.yml', I got the following error:

/Users/mickaelperrin/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- docker-sync/update_check (LoadError)
from /Users/mickaelperrin/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/bin/docker-sync:5:in `<main>'

This also prevents the sync to be done on fsevents.

Using an absolute path works.

Unable to get it working

Hi,

Thanks for working on this project.

I tried to configure my own docker project ith docker_sync and also tried the boiler plate but each ends with the error:

      ok  Starting unison
/Users/mickaelperrin/tmp/docker_sync/lib/docker_sync/sync_strategy/unison.rb:38:in `sync': undefined method `join' for nil:NilClass (NoMethodError)
from /Users/mickaelperrin/tmp/docker_sync/lib/docker_sync/sync_strategy/unison.rb:93:in `start_container'
from /Users/mickaelperrin/tmp/docker_sync/lib/docker_sync/sync_strategy/unison.rb:32:in `run'
from /Users/mickaelperrin/tmp/docker_sync/lib/docker_sync/sync_process.rb:64:in `run'
from /Users/mickaelperrin/tmp/docker_sync/lib/docker_sync/sync_manager.rb:103:in `block in run'
from /Users/mickaelperrin/tmp/docker_sync/lib/docker_sync/sync_manager.rb:102:in `each'
from /Users/mickaelperrin/tmp/docker_sync/lib/docker_sync/sync_manager.rb:102:in `run'
from /Users/mickaelperrin/tmp/docker_sync/tasks/sync.thor:32:in `start'
from /Users/mickaelperrin/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/mickaelperrin/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/mickaelperrin/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /Users/mickaelperrin/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from ../../docker_sync/bin/docker-sync:11:in `<main>'

It looks like the args are not properly parsed.

Am I missing something ?

Regards,

Watchers as daemons ?

Hi,

I would love to have the opportunity to start / stop watchers from external calls. This would allow deactivating syncing temporarily when performing some tasks and reenable when needed.

The first use case of this is currently while installing Drupal from composer, we could wait the end of the bootstrapping script and the run manually a sync task.

What do you think of that ? what about implementing them as daemons ?

In some yet unclear situations, fswatch process stay alive

the fswatch stay alive and are not cleaned up anymore, beside one could do a

pkill fswatch to kill all of the running watchers.

It seems to happen if compose times out with the regular "to long HTTP request" - maybe others.

An HTTP request took too long to complete. Retry with --verbose to obtain debug information.
If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).
EXCEPTION: #<Docker::Compose::Error: 'up' failed with status 'pid 4925 exit 1': 

Not sure how to tackle this issue, we probably should rethink our whole architecture using either local sockets or pids

docker_sync fails to start with verbose option

I am experiencing sync issues with unison, I try to understand what's going on.

I activated the verbose option and got this issue. It looks like there is a color definition missing.

 /Users/mickaelperrin/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/shell/color.rb:90:in `const_get': uninitialized constant OK (NameError)
from /Users/mickaelperrin/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/shell/color.rb:90:in `set_color'
from /Users/mickaelperrin/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/shell/basic.rb:98:in `say_status'
from /Users/mickaelperrin/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/shell.rb:59:in `say_status'
from /Users/mickaelperrin/tmp/docker_sync/lib/docker_sync/sync_strategy/unison.rb:83:in `start_container'
from /Users/mickaelperrin/tmp/docker_sync/lib/docker_sync/sync_strategy/unison.rb:32:in `run'
from /Users/mickaelperrin/tmp/docker_sync/lib/docker_sync/sync_process.rb:64:in `run'
from /Users/mickaelperrin/tmp/docker_sync/lib/docker_sync/sync_manager.rb:103:in `block in run'
from /Users/mickaelperrin/tmp/docker_sync/lib/docker_sync/sync_manager.rb:102:in `each'
from /Users/mickaelperrin/tmp/docker_sync/lib/docker_sync/sync_manager.rb:102:in `run'
from /Users/mickaelperrin/tmp/docker_sync/tasks/sync.thor:32:in `start'
from /Users/mickaelperrin/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/mickaelperrin/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/mickaelperrin/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /Users/mickaelperrin/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from ../../../docker_sync/bin/docker-sync:11:in `<main>'

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.