magento / magento-cloud

Magento Cloud
Open Software License 3.0
207 stars 237 forks source link

Docker-sync is not copying code from host to magento containers. #478

Closed nithincninan closed 4 years ago

nithincninan commented 4 years ago

Hi Team,

We have tried magento-2 docker setup on windows10. we are facing issues on docker-sync. Below are the details:

Setup Details:

  1. Clone magento2 files from cloud repo ( https://github.com/magento/magento-cloud ), branch name was M2 2.3.3

  2. We are following this documentation (https://devdocs.magento.com/cloud/docker/docker-mode-developer.html) and was able to complete step 1 to 3 But we are facing issues with step 4 (docker-sycn installing on windows). Please note we are following docker-sync installation using https://docker-sync.readthedocs.io/en/latest/getting-started/installation.html#windows

  3. we have completed docker-sync installation also configure docker-sync.yml file.

    version: 2
    options:
    max_attempt: 30
    verbose: true
    syncs:
    magento-sync:
    src: './'
    sync_excludes:
      - '.git'
      - '.idea'
      - '.magento'
      - '.docker'
      - '.github'
      - '*.sql'
      - '*.gz'
      - '*.zip'
      - '*.bz2'
    sync_userid: '1000'
    sync_strategy: 'unison'
  4. Launched the docker-sync using ece-docker command :

vendor/bin/ece-docker build:compose --mode="developer" --sync-engine="docker-sync"

  1. docker-compose.yml file is created. All magento containers were launched successfully.
CONTAINER ID        IMAGE                                                COMMAND                  CREATED             STATUS                 PORTS                         NAMES
0f3d1423c045        eugenmayer/unison:2.51.2.2                           "/entrypoint.sh supe…"   About an hour ago   Up About an hour       127.0.0.1:32769->5000/tcp     magento-sync
7405b214cbef        magento/magento-cloud-docker-tls:latest-1.1          "/entrypoint.sh"         3 hours ago         Up 3 hours             0.0.0.0:443->443/tcp          magento-cloud_tls_1
810d9dd5cd81        magento/magento-cloud-docker-varnish:latest-1.1      "/entrypoint.sh"         3 hours ago         Up 3 hours             80/tcp                        magento-cloud_varnish_1
405380f91e30        magento/magento-cloud-docker-nginx:latest-1.1        "/docker-entrypoint.…"   3 hours ago         Up 3 hours (healthy)   0.0.0.0:80->80/tcp, 443/tcp   magento-cloud_web_1
04b4675ee02e        magento/magento-cloud-docker-php:7.3-fpm-1.1         "/docker-entrypoint.…"   3 hours ago         Up 3 hours (healthy)   9000/tcp                      magento-cloud_fpm_1
d4cfda59feb2        mariadb:10.2                                         "docker-entrypoint.s…"   3 hours ago         Up 3 hours (healthy)   0.0.0.0:32779->3306/tcp       magento-cloud_db_1
0273345c6fe4        redis:5.0                                            "docker-entrypoint.s…"   3 hours ago         Up 3 hours (healthy)   0.0.0.0:32778->6379/tcp       magento-cloud_redis_1
b5ac8f671c1d        magento/magento-cloud-docker-elasticsearch:6.5-1.1   "/usr/local/bin/dock…"   3 hours ago         Up 3 hours (healthy)   9200/tcp, 9300/tcp            magento-cloud_elasticsearch_1
  1. After this, we have started docker-sync start command to copy all the files from my host(laptop) to all Magento containers. But docker-sync is running in a loop. But we do not find any changes/contents in /app directory in all containers(fpm/web/magento containers).
Copying properties for dev/tests/integration/testsuite/Magento/Staging/Model/UpdateRepositoryTest.php from /c/Users/chackoni/magento-cloud to //0f3d1423c045//app_sync
Failed: Failed to set permissions of file /app_sync/dev/tests/integration/testsuite/Magento/GiftRegistry/Model/Config/_files/Magento/Reward/etc/giftregistry.xml to ?????w??w?: the permissions was set to ?????-??-? instead. The filesystem probably does not support all permission bits. If this is a FAT filesystem, you should set the "fat" option to true. Otherwise, you should probably set the "perms" option to 0o1755 (or to 0 if you don't need to synchronize permissions).
[BGN] Copying properties for dev/tests/integration/testsuite/Magento/Staging/_files/cleaner.php from /c/Users/chackoni/magento-cloud to //0f3d1423c045//app_sync
Failed: Failed to set permissions of file /app_sync/dev/tests/integration/testsuite/Magento/GiftRegistry/Model/Config/_files/giftregistry_config.php to ?????w??w?: the permissions was set to ?????-??-? instead. The filesystem probably does not support all permission bits. If this is a FAT filesystem, you should set the "fat" option to true. Otherwise, you should probably set the "perms" option to 0o1755 (or to 0 if you don't need to synchronize permissions).
[BGN] Copying properties for dev/tests/integration/testsuite/Magento/Staging/_files/search_staging_update.php from /c/Users/chackoni/magento-cloud to //0f3d1423c045//app_sync

Kindly Please let us know what is the correct method for configuration to setup the docker-sync for magento -cloud docker(docker-sync is running in loop)

Thanks! Nithin Ninan

nithincninan commented 4 years ago

Please close this ticket, since I resolved it by correcting "sync" name in both docker-compose.yml and docker-sync.yml.

Thanks!

siju-corra commented 4 years ago

Thanks @nithincninan for this info. I had same problem and it was resolved with your fix. You are a rockstar!