master 8ebb9dd71fe7 cached
74 files
19.8 KB
7.4k tokens
1 requests
Download .txt
Repository: EugenMayer/docker-sync-boilerplate
Branch: master
Commit: 8ebb9dd71fe7
Files: 74
Total size: 19.8 KB

Directory structure:
gitextract_zhc_v5d4/

├── .github/
│   └── FUNDING.yml
├── .gitignore
├── .idea/
│   ├── compiler.xml
│   ├── copyright/
│   │   └── profiles_settings.xml
│   ├── docker-sync-boilerplate.iml
│   ├── encodings.xml
│   ├── misc.xml
│   ├── modules.xml
│   └── vcs.xml
├── README.md
├── advanced/
│   ├── app/
│   │   └── index.html
│   ├── docker-compose/
│   │   ├── docker-compose-dev.yml
│   │   └── docker-compose.yml
│   └── docker-sync.yml
├── default/
│   ├── app/
│   │   └── index.html
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
├── default_monit/
│   ├── app/
│   │   └── index.html
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
├── default_with_user/
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
├── docker-compose-only/
│   ├── docker-compose-dev.yml
│   └── docker-compose.yml
├── dynamic-configuration-dotnev/
│   ├── app/
│   │   ├── ignored_folder/
│   │   │   └── index.html
│   │   ├── index.html
│   │   └── some_folder/
│   │       ├── .ignored_dot_folder/
│   │       │   └── index.html
│   │       ├── ignored_folder/
│   │       │   └── index.html
│   │       └── index.html
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
├── not_default_config_name/
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync-special.yml
├── rsync/
│   ├── app/
│   │   └── index.html
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
├── simplest/
│   ├── app/
│   │   └── index.html
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
├── unison/
│   ├── app/
│   │   ├── ignored_folder/
│   │   │   └── index.html
│   │   ├── index.html
│   │   └── some_folder/
│   │       ├── .ignored_dot_folder/
│   │       │   └── index.html
│   │       ├── ignored_folder/
│   │       │   └── index.html
│   │       └── index.html
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
├── unison-ftp-user/
│   ├── app/
│   │   ├── ignored_folder/
│   │   │   └── index.html
│   │   ├── index.html
│   │   └── some_folder/
│   │       ├── .ignored_dot_folder/
│   │       │   └── index.html
│   │       ├── ignored_folder/
│   │       │   └── index.html
│   │       └── index.html
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
├── unison-new-user/
│   ├── app/
│   │   └── index.html
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
└── unison-root-user/
    ├── app/
    │   ├── ignored_folder/
    │   │   └── index.html
    │   ├── index.html
    │   └── some_folder/
    │       ├── .ignored_dot_folder/
    │       │   └── index.html
    │       ├── ignored_folder/
    │       │   └── index.html
    │       └── index.html
    ├── docker-compose-dev.yml
    ├── docker-compose.yml
    └── docker-sync.yml

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms

github: eugenmayer
patreon: eugenmayer


================================================
FILE: .gitignore
================================================
.idea/workspace.xml
.idea/composerJson.xml
.docker-sync
*/.env


================================================
FILE: .idea/compiler.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="CompilerConfiguration">
    <resourceExtensions />
    <wildcardResourcePatterns>
      <entry name="!?*.java" />
      <entry name="!?*.form" />
      <entry name="!?*.class" />
      <entry name="!?*.groovy" />
      <entry name="!?*.scala" />
      <entry name="!?*.flex" />
      <entry name="!?*.kt" />
      <entry name="!?*.clj" />
      <entry name="!?*.aj" />
    </wildcardResourcePatterns>
    <annotationProcessing>
      <profile default="true" name="Default" enabled="false">
        <processorPath useClasspath="true" />
      </profile>
    </annotationProcessing>
  </component>
</project>

================================================
FILE: .idea/copyright/profiles_settings.xml
================================================
<component name="CopyrightManager">
  <settings default="" />
</component>

================================================
FILE: .idea/docker-sync-boilerplate.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
  <component name="NewModuleRootManager" inherit-compiler-output="true">
    <exclude-output />
    <content url="file://$MODULE_DIR$" />
    <orderEntry type="inheritedJdk" />
    <orderEntry type="sourceFolder" forTests="false" />
  </component>
</module>

================================================
FILE: .idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="Encoding">
    <file url="PROJECT" charset="UTF-8" />
  </component>
</project>

================================================
FILE: .idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="MavenImportPreferences">
    <option name="generalSettings">
      <MavenGeneralSettings>
        <option name="mavenHome" value="Bundled (Maven 3)" />
      </MavenGeneralSettings>
    </option>
  </component>
  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="true" />
  <component name="masterDetails">
    <states>
      <state key="ProjectJDKs.UI">
        <settings>
          <last-edited>1.7</last-edited>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
    </states>
  </component>
</project>

================================================
FILE: .idea/modules.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/.idea/docker-sync-boilerplate.iml" filepath="$PROJECT_DIR$/.idea/docker-sync-boilerplate.iml" />
    </modules>
  </component>
</project>

================================================
FILE: .idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="VcsDirectoryMappings">
    <mapping directory="" vcs="Git" />
  </component>
</project>

================================================
FILE: README.md
================================================
This is a boilerplate for [docker-sync](https://github.com/EugenMayer/docker_sync).
Either as a starting point for your configuration or to try out what docker-sync offers in terms of performance and the toolchain in practical.

If you have any issues, create an issue at [docker-sync](https://github.com/EugenMayer/docker_sync)

**Start with**

 1) Install docker-sync, if you did not yet

```
gem install docker-sync
```

There may be other dependencies that you will have to install but the `docker-sync-stack start` command should help with that. Known dependencies for Mac include: unison, macfsevent, fswatch. These are either installed automatically or you may have to `brew install` them.

 2) Now get the boilerplate
```
git clone https://github.com/EugenMayer/docker-sync-boilerplate
cd docker-sync-boilerplate
```

 3) Now start the sync, first choose the boilerplate either advanced, dynamic-configuration-dotnev, rsync, simplest, unison, unison-ftp-user, or unison-root-user. See [strategies](https://docker-sync.readthedocs.io/en/latest/advanced/sync-strategies.html) to understand the important differences

---

## Examples

For example rsync
```
cd default
docker-sync-stack start
```
This will start the sync, and start your app-stack defined by in the docker-compose file. All in one step

---

If you wonder, how you would keep the docker-compose.yml portable, see splitted-compose (there is an example in the advanced example of this). The changes for docker-sync are incorporated into an overlay-docker-compose file
In this case you do:

```
# To run development and mount your watched volume.
cd advanced
docker-sync-stack start

# Production would run docker-compose without mounting a watched volume.
cd advanced/docker-compose
docker-compose up -d
```

More about this in [the wiki](https://docker-sync.readthedocs.io/en/latest/getting-started/configuration.html?highlight=portable#portable-docker-compose-yml)

---

For example __dynamic-configuration-dotnev__ you will need to __copy__ `.env.dist` to `.env`

```
cd dynamic-configuration-dotnev
cp .env.dist .env
## Change your settings to whatever you want and then run docker-sync.
docker-sync-stack start
```

And after that start things as described above


## Reference

If you want to know, what options you actually have, see the [configuration-reference](https://docker-sync.readthedocs.io/en/latest/getting-started/configuration.html)


================================================
FILE: advanced/app/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: advanced/docker-compose/docker-compose-dev.yml
================================================
# this is our development docker-compose building on top of the prodicker docker-compose, just mounting
# the sync image - not redefining anything else

version: "2"
services:
  app-advanced:
    volumes_from:
      - container:advanced-sync:nocopy # will be mounted on /var/www

# that the important thing
volumes:
  advanced-sync:
    external: true


================================================
FILE: advanced/docker-compose/docker-compose.yml
================================================
# This is our production compose file - not changed for docker-sync or similar

version: "2"
services:
  app-advanced:
    image: alpine
    command: ['watch', '-n3', 'cat /var/www/index.html']



================================================
FILE: advanced/docker-sync.yml
================================================
version: "2"

options:
  compose-file-path: './docker-compose/docker-compose.yml'
  compose-dev-file-path: './docker-compose/docker-compose-dev.yml'
  verbose: true # make the whole sync verbose
syncs:
  advanced-sync: #tip: add -sync and you keep consistent names as a convention
    src: './app'
    sync_host_ip: 'auto'
    sync_host_port: 10872
    sync_userid: '1001'
    watch_args: '-v' # make watching verbose



================================================
FILE: default/app/index.html
================================================
inital, now change app/index.html and see if this will change me
assa


================================================
FILE: default/docker-compose-dev.yml
================================================
# this is our development docker-compose building on top of the production docker-compose, just mounting
# the sync image - not redefining anything else

version: "2"
services:
  app-native-osx:
    volumes:
      - appcode-native-osx-sync:/var/www:nocopy # nocopy is important

# that the important thing
volumes:
  appcode-native-osx-sync:
    external: true


================================================
FILE: default/docker-compose.yml
================================================
# This is our production compose file - not changed for docker-sync or similar

version: "2"
services:
  app-native-osx:
    image: alpine
    command: 'watch -n3 cat /var/www/index.html'


================================================
FILE: default/docker-sync.yml
================================================
version: "2"

options:
  verbose: true
syncs:
  appcode-native-osx-sync: # tip: add -sync and you keep consistent names as a convention
    src: './app'
    # sync_strategy: 'native_osx' # not needed, this is the default now
    sync_excludes: ['ignored_folder', '.ignored_dot_folder']


================================================
FILE: default_monit/app/index.html
================================================
inital, now change app/index.html and see if this will change me


================================================
FILE: default_monit/docker-compose-dev.yml
================================================
# this is our development docker-compose building on top of the production docker-compose, just mounting
# the sync image - not redefining anything else

version: "2"
services:
  app-native-osx:
    volumes:
      - appcode-native-osx-sync:/var/www:nocopy # nocopy is important

# that the important thing
volumes:
  appcode-native-osx-sync:
    external: true


================================================
FILE: default_monit/docker-compose.yml
================================================
# This is our production compose file - not changed for docker-sync or similar

version: "2"
services:
  app-native-osx:
    image: alpine
    command: ['watch', '-n3', 'cat /var/www/index.html']


================================================
FILE: default_monit/docker-sync.yml
================================================
version: "2"

options:
  verbose: true
syncs:
  appcode-native-osx-sync: # tip: add -sync and you keep consistent names as a convention
    src: './app'
    # sync_strategy: 'native_osx' # not needed, this is the default now
    sync_excludes: ['ignored_folder', '.ignored_dot_folder']

    monit_enable: true

    # increase tolerance of high cpu if regular syncing uses a lot cpu
    monit_interval: 10
    monit_high_cpu_cycles: 6


================================================
FILE: default_with_user/docker-compose-dev.yml
================================================
# this is our development docker-compose building on top of the production docker-compose, just mounting
# the sync image - not redefining anything else

version: "2"
services:
  app-native-osx:
    volumes:
      - appcode-native-osx-sync:/var/www:nocopy # will be mounted on /var/www

# that the important thing
volumes:
  appcode-native-osx-sync:
    external: true


================================================
FILE: default_with_user/docker-compose.yml
================================================
# This is our production compose file - not changed for docker-sync or similar

version: "2"
services:
  app-native-osx:
    image: alpine
    command: ['watch', '-n3', 'cat /var/www/index.html']


================================================
FILE: default_with_user/docker-sync.yml
================================================
version: "2"

options:
  verbose: true
syncs:
  appcode-native-osx-sync: # tip: add -sync and you keep consistent names as a convention
    src: './app'
    sync_userid: 33
    # sync_strategy: 'native_osx' # not needed, this is the default now
    sync_excludes: ['ignored_folder', '.ignored_dot_folder']


================================================
FILE: docker-compose-only/docker-compose-dev.yml
================================================
# This is our development docker-compose file, building on top of the prod one.
# This file adds a synchronisation between ./app and /var/www, that has the same
# performance characteristics as the default native_osxfs scheme defined in
# ../default/.
# This example configuration runs the same docker image as ../default, with the
# same environment. It does not need a docker-sync daemon running on your host
# though, so you can bring up your development environment using
# `docker-compose up -d` without first running `docker-sync start`. If you wish
# to read the logs of the sync process, use `docker-compose logs app-syncer`.
#
# If you have a native_osxfs based docker-sync configuration that you want to
# turn into a docker-compose only configuration, run `docker-sync start` and
# then use `docker inspect -f '{{ .Mounts }}' $container_id` and
# `docker exec $container_id env` to work out the elements needed to create a
# docker-compose based container definition.

version: "2"
services:
  app-docker-compose-only:
    volumes:
      # If you wanted to do this via docker-for-mac's default osxfs mounts, you
      # would simply write - ./app:/var/www. In our case, we want to
      # improve our filesystem performance, by adding unison as a layer of
      # indirection. To do this, we create a named volume (
      # 'app-docker-compose-only-sync' by convention, to avoid clashing with
      # other named volumes) and then start a second docker container which
      # runs unison to sync ./app with app-docker-compose-only-sync.
      - app-docker-compose-only-sync:/var/www:nocopy

  app-syncer:
    image: eugenmayer/unison:2.51.2.1
    command: /entrypoint.sh supervisord
    volumes:
      # This container is configured to sync /host_sync to /app_sync. We bind
      # ./app to /host_sync using docker-for-mac's osxfs, and then bind
      # /app_sync to our app-docker-compose-only-sync named volume, so that it
      # can be used by our `app-docker-compose-only` container, above.
      - ./app:/host_sync
      - app-docker-compose-only-sync:/app_sync
    environment:
      # These variables control which directories are synced by unison.
      - HOST_VOLUME=/host_sync
      - APP_VOLUME=/app_sync
      - UNISON_SRC=/host_sync
      - UNISON_DEST=/app_sync
      - UNISON_DIR=/data
      # The -ignore flags correspond to the line
      # `sync_excludes: ['ignored_folder', '.ignored_dot_folder']`
      # in `../default/docker-sync.yml`. Read the unison manual for details
      # of their ignore patterns. All other flags are fine to leave as they are.
      - UNISON_ARGS=-ignore='Name ignored_folder' -ignore='Name .ignored_dot_folder' -prefer /host_sync -numericids -auto -batch
      - UNISON_WATCH_ARGS=-repeat watch
      # A few extra environment variables to make C libraries behave sensibly.
      - TZ=Europe/London
      - LANG=C.UTF-8
      - HOME=/root

# Named volumes must be declared in the `volumes` section, but don't need any
# other configuration.
volumes:
  ? app-docker-compose-only-sync


================================================
FILE: docker-compose-only/docker-compose.yml
================================================
# This is our production compose file - not changed for docker-sync or similar

version: "2"
services:
  app-docker-compose-only:
    image: alpine
    command: ["sh", "-c", "while sleep 3; do cat /var/www/index.html; done"]


================================================
FILE: dynamic-configuration-dotnev/app/ignored_folder/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: dynamic-configuration-dotnev/app/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: dynamic-configuration-dotnev/app/some_folder/.ignored_dot_folder/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: dynamic-configuration-dotnev/app/some_folder/ignored_folder/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: dynamic-configuration-dotnev/app/some_folder/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: dynamic-configuration-dotnev/docker-compose-dev.yml
================================================
# this is our development docker-compose building on top of the production
# docker-compose, just mounting the sync image - not redefining anything else

version: "2"
services:
  app-unison:
    volumes:
      - docker-sync:${DESTINATION_PATH}:nocopy # will be mounted on to the value of DESTINATION_PATH

# that the important thing
volumes:
  docker-sync:
    external:
      name: "${SYNC_NAME}-unison-sync"


================================================
FILE: dynamic-configuration-dotnev/docker-compose.yml
================================================
# This is our production compose file - not changed for docker-sync or similar

version: "2"
services:
  app-unison:
    image: alpine
    command: ['watch', '-n3', 'cat /var/www/index.html']


================================================
FILE: dynamic-configuration-dotnev/docker-sync.yml
================================================
version: "2"

options:
  verbose: true
syncs:
  #IMPORTANT: ensure this name is unique and does not match your other application container name
  ${SYNC_NAME}-unison-sync: # tip: add -sync and you keep consistent names as a convention
    src: '${APP_PATH}'
    sync_excludes: ['ignored_folder', '.ignored_dot_folder']


================================================
FILE: not_default_config_name/docker-compose-dev.yml
================================================
# this is our development docker-compose building on top of the production docker-compose, just mounting
# the sync image - not redefining anything else

version: "2"
services:
  app-native-osx:
    volumes:
      - appcode-native-osx-sync:/var/www:nocopy # will be mounted on /var/www

# that the important thing
volumes:
  appcode-native-osx-sync:
    external: true


================================================
FILE: not_default_config_name/docker-compose.yml
================================================
# This is our production compose file - not changed for docker-sync or similar

version: "2"
services:
  app-native-osx:
    image: alpine
    command: ['watch', '-n3', 'cat /var/www/index.html']


================================================
FILE: not_default_config_name/docker-sync-special.yml
================================================
version: "2"

options:
  verbose: true
syncs:
  appcode-native-osx-sync: # tip: add -sync and you keep consistent names as a convention
    src: './app'
    # sync_strategy: 'native_osx' # not needed, this is the default now
    sync_excludes: ['ignored_folder', '.ignored_dot_folder']


================================================
FILE: rsync/app/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: rsync/docker-compose-dev.yml
================================================
# this is our development docker-compose building on top of the production docker-compose, just mounting
# the sync image - not redefining anything else

version: "2"
services:
  app-rsync:
    volumes:
      - appcode-rsync-sync:/var/www:nocopy # will be mounted on /var/www

# that the important thing
volumes:
  appcode-rsync-sync:
    external: true


================================================
FILE: rsync/docker-compose.yml
================================================
# This is our production compose file - not changed for docker-sync or similar

version: "2"
services:
  app-rsync:
    image: alpine
    command: ['watch', '-n3', 'cat /var/www/index.html']


================================================
FILE: rsync/docker-sync.yml
================================================
version: "2"
options:
  verbose: true
syncs:
  #IMPORTANT: ensure this name is unique and does not match your other application container name
  appcode-rsync-sync: #tip: add -sync and you keep consistent names as a convention
    src: './app/'
    sync_host_ip: 'auto'
    sync_host_port: 10872
    sync_strategy: 'rsync'



================================================
FILE: simplest/app/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: simplest/docker-compose-dev.yml
================================================
# this is our development docker-compose building on top of the prodicker docker-compose, just mounting
# the sync image - not redefining anything else

version: "2"
services:
  app-simplest:
    volumes:
      - simplest-sync:/var/www:nocopy # will be mounted on /var/www

# that the important thing
volumes:
  simplest-sync:
    external: true


================================================
FILE: simplest/docker-compose.yml
================================================
# This is our production compose file - not changed for docker-sync or similar

version: "2"
services:
  app-simplest:
    image: alpine
    command: ['watch', '-n3', 'cat /var/www/index.html']

================================================
FILE: simplest/docker-sync.yml
================================================
version: "2"

syncs:
  #IMPORTANT: ensure this name is unique and does not match your other application container name
  simplest-sync: #tip: add -sync and you keep consistent names as a convention
    src: './app'


================================================
FILE: unison/app/ignored_folder/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: unison/app/index.html
================================================
aSome random HTML file hereasdasd
NEW


================================================
FILE: unison/app/some_folder/.ignored_dot_folder/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: unison/app/some_folder/ignored_folder/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: unison/app/some_folder/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: unison/docker-compose-dev.yml
================================================
# this is our development docker-compose building on top of the production docker-compose, just mounting
# the sync image - not redefining anything else

version: "2"
services:
  app-unison:
    volumes:
      - appcode-unison-sync:/var/www:nocopy # will be mounted on /var/www

# that the important thing
volumes:
  appcode-unison-sync:
    external: true


================================================
FILE: unison/docker-compose.yml
================================================
# This is our production compose file - not changed for docker-sync or similar

version: "2"
services:
  app-unison:
    image: alpine
    command: ['watch', '-n3', 'cat /var/www/index.html']


================================================
FILE: unison/docker-sync.yml
================================================
version: "2"

options:
  verbose: true
  max_attempt: 30
syncs:
  #IMPORTANT: ensure this name is unique and does not match your other application container name
  appcode-unison-sync: # tip: add -sync and you keep consistent names as a convention
    src: './app'
    sync_strategy: 'unison'
    sync_excludes: ['ignored_folder', '.ignored_dot_folder']


================================================
FILE: unison-ftp-user/app/ignored_folder/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: unison-ftp-user/app/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: unison-ftp-user/app/some_folder/.ignored_dot_folder/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: unison-ftp-user/app/some_folder/ignored_folder/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: unison-ftp-user/app/some_folder/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: unison-ftp-user/docker-compose-dev.yml
================================================
# this is our development docker-compose building on top of the production docker-compose, just mounting
# the sync image - not redefining anything else

version: "2"
services:
  app-unison:
    volumes:
      - appcode-unison-sync:/var/www:nocopy # will be mounted on /var/www

# that the important thing
volumes:
  appcode-unison-sync:
    external: true


================================================
FILE: unison-ftp-user/docker-compose.yml
================================================
# This is our production compose file - not changed for docker-sync or similar

version: "2"
services:
  app-unison:
    image: alpine
    command: ['watch', '-n3', 'cat /var/www/index.html']


================================================
FILE: unison-ftp-user/docker-sync.yml
================================================
version: "2"

options:
  verbose: true
syncs:
  #IMPORTANT: ensure this name is unique and does not match your other application container name
  appcode-unison-sync: # tip: add -sync and you keep consistent names as a convention
    src: './app'
    sync_excludes: ['ignored_folder', '.ignored_dot_folder']
    # example on how to let the files be owned by uid 22, thats the ftp user
    sync_userid: '21'
    sync_strategy: 'unison'



================================================
FILE: unison-new-user/app/index.html
================================================
eugen

================================================
FILE: unison-new-user/docker-compose-dev.yml
================================================
# this is our development docker-compose building on top of the production docker-compose, just mounting
# the sync image - not redefining anything else

version: "2"
services:
  app-unison:
    volumes:
      - appcode-unison-sync:/var/www:nocopy # will be mounted on /var/www

# that the important thing
volumes:
  appcode-unison-sync:
    external: true


================================================
FILE: unison-new-user/docker-compose.yml
================================================
# This is our production compose file - not changed for docker-sync or similar

version: "2"
services:
  app-unison:
    image: alpine
    container_name: 'your-app'
    command: 'watch -n3 cat /var/www/index.html'



================================================
FILE: unison-new-user/docker-sync.yml
================================================
version: "2"

options:
  verbose: true
syncs:
  #IMPORTANT: ensure this name is unique and does not match your other application container name
  appcode-unison-sync: # tip: add -sync and you keep consistent names as a convention
    src: './app'
    sync_excludes: ['ignored_folder', '.ignored_dot_folder']
    # example on how to let the files be owned by uid 22, thats the ftp user
    sync_userid: '10002'
    sync_strategy: 'unison'


================================================
FILE: unison-root-user/app/ignored_folder/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: unison-root-user/app/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: unison-root-user/app/some_folder/.ignored_dot_folder/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: unison-root-user/app/some_folder/ignored_folder/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: unison-root-user/app/some_folder/index.html
================================================
Some random HTML file hereasdasd
NEW


================================================
FILE: unison-root-user/docker-compose-dev.yml
================================================
# this is our development docker-compose building on top of the production docker-compose, just mounting
# the sync image - not redefining anything else

version: "2"
services:
  app-unison:
    volumes:
      - appcode-unison-sync:/var/www:nocopy # will be mounted on /var/www

# that the important thing
volumes:
  appcode-unison-sync:
    external: true


================================================
FILE: unison-root-user/docker-compose.yml
================================================
# This is our production compose file - not changed for docker-sync or similar

version: "2"
services:
  app-unison:
    image: alpine
    command: ['watch', '-n3', 'cat /var/www/index.html']


================================================
FILE: unison-root-user/docker-sync.yml
================================================
version: "2"

options:
  verbose: true
syncs:
  #IMPORTANT: ensure this name is unique and does not match your other application container name
  appcode-unison-sync: # tip: add -sync and you keep consistent names as a convention
    src: './app'
    sync_excludes: ['ignored_folder', '.ignored_dot_folder']
    # the files should be own by root in the target cointainer
    sync_userid: 0
    sync_strategy: 'unison'
Download .txt
gitextract_zhc_v5d4/

├── .github/
│   └── FUNDING.yml
├── .gitignore
├── .idea/
│   ├── compiler.xml
│   ├── copyright/
│   │   └── profiles_settings.xml
│   ├── docker-sync-boilerplate.iml
│   ├── encodings.xml
│   ├── misc.xml
│   ├── modules.xml
│   └── vcs.xml
├── README.md
├── advanced/
│   ├── app/
│   │   └── index.html
│   ├── docker-compose/
│   │   ├── docker-compose-dev.yml
│   │   └── docker-compose.yml
│   └── docker-sync.yml
├── default/
│   ├── app/
│   │   └── index.html
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
├── default_monit/
│   ├── app/
│   │   └── index.html
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
├── default_with_user/
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
├── docker-compose-only/
│   ├── docker-compose-dev.yml
│   └── docker-compose.yml
├── dynamic-configuration-dotnev/
│   ├── app/
│   │   ├── ignored_folder/
│   │   │   └── index.html
│   │   ├── index.html
│   │   └── some_folder/
│   │       ├── .ignored_dot_folder/
│   │       │   └── index.html
│   │       ├── ignored_folder/
│   │       │   └── index.html
│   │       └── index.html
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
├── not_default_config_name/
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync-special.yml
├── rsync/
│   ├── app/
│   │   └── index.html
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
├── simplest/
│   ├── app/
│   │   └── index.html
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
├── unison/
│   ├── app/
│   │   ├── ignored_folder/
│   │   │   └── index.html
│   │   ├── index.html
│   │   └── some_folder/
│   │       ├── .ignored_dot_folder/
│   │       │   └── index.html
│   │       ├── ignored_folder/
│   │       │   └── index.html
│   │       └── index.html
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
├── unison-ftp-user/
│   ├── app/
│   │   ├── ignored_folder/
│   │   │   └── index.html
│   │   ├── index.html
│   │   └── some_folder/
│   │       ├── .ignored_dot_folder/
│   │       │   └── index.html
│   │       ├── ignored_folder/
│   │       │   └── index.html
│   │       └── index.html
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
├── unison-new-user/
│   ├── app/
│   │   └── index.html
│   ├── docker-compose-dev.yml
│   ├── docker-compose.yml
│   └── docker-sync.yml
└── unison-root-user/
    ├── app/
    │   ├── ignored_folder/
    │   │   └── index.html
    │   ├── index.html
    │   └── some_folder/
    │       ├── .ignored_dot_folder/
    │       │   └── index.html
    │       ├── ignored_folder/
    │       │   └── index.html
    │       └── index.html
    ├── docker-compose-dev.yml
    ├── docker-compose.yml
    └── docker-sync.yml
Condensed preview — 74 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (26K chars).
[
  {
    "path": ".github/FUNDING.yml",
    "chars": 86,
    "preview": "# These are supported funding model platforms\n\ngithub: eugenmayer\npatreon: eugenmayer\n"
  },
  {
    "path": ".gitignore",
    "chars": 63,
    "preview": ".idea/workspace.xml\n.idea/composerJson.xml\n.docker-sync\n*/.env\n"
  },
  {
    "path": ".idea/compiler.xml",
    "chars": 686,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"CompilerConfiguration\">\n    <resourceExt"
  },
  {
    "path": ".idea/copyright/profiles_settings.xml",
    "chars": 74,
    "preview": "<component name=\"CopyrightManager\">\n  <settings default=\"\" />\n</component>"
  },
  {
    "path": ".idea/docker-sync-boilerplate.iml",
    "chars": 336,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n  <component name=\"NewModuleRootManager\" "
  },
  {
    "path": ".idea/encodings.xml",
    "chars": 159,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"Encoding\">\n    <file url=\"PROJECT\" chars"
  },
  {
    "path": ".idea/misc.xml",
    "chars": 812,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"MavenImportPreferences\">\n    <option nam"
  },
  {
    "path": ".idea/modules.xml",
    "chars": 298,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectModuleManager\">\n    <modules>\n   "
  },
  {
    "path": ".idea/vcs.xml",
    "chars": 167,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping dire"
  },
  {
    "path": "README.md",
    "chars": 2422,
    "preview": "This is a boilerplate for [docker-sync](https://github.com/EugenMayer/docker_sync).\nEither as a starting point for your "
  },
  {
    "path": "advanced/app/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "advanced/docker-compose/docker-compose-dev.yml",
    "chars": 352,
    "preview": "# this is our development docker-compose building on top of the prodicker docker-compose, just mounting\n# the sync image"
  },
  {
    "path": "advanced/docker-compose/docker-compose.yml",
    "chars": 195,
    "preview": "# This is our production compose file - not changed for docker-sync or similar\n\nversion: \"2\"\nservices:\n  app-advanced:\n "
  },
  {
    "path": "advanced/docker-sync.yml",
    "chars": 419,
    "preview": "version: \"2\"\n\noptions:\n  compose-file-path: './docker-compose/docker-compose.yml'\n  compose-dev-file-path: './docker-com"
  },
  {
    "path": "default/app/index.html",
    "chars": 70,
    "preview": "inital, now change app/index.html and see if this will change me\nassa\n"
  },
  {
    "path": "default/docker-compose-dev.yml",
    "chars": 361,
    "preview": "# this is our development docker-compose building on top of the production docker-compose, just mounting\n# the sync imag"
  },
  {
    "path": "default/docker-compose.yml",
    "chars": 188,
    "preview": "# This is our production compose file - not changed for docker-sync or similar\n\nversion: \"2\"\nservices:\n  app-native-osx:"
  },
  {
    "path": "default/docker-sync.yml",
    "chars": 286,
    "preview": "version: \"2\"\n\noptions:\n  verbose: true\nsyncs:\n  appcode-native-osx-sync: # tip: add -sync and you keep consistent names "
  },
  {
    "path": "default_monit/app/index.html",
    "chars": 65,
    "preview": "inital, now change app/index.html and see if this will change me\n"
  },
  {
    "path": "default_monit/docker-compose-dev.yml",
    "chars": 361,
    "preview": "# this is our development docker-compose building on top of the production docker-compose, just mounting\n# the sync imag"
  },
  {
    "path": "default_monit/docker-compose.yml",
    "chars": 196,
    "preview": "# This is our production compose file - not changed for docker-sync or similar\n\nversion: \"2\"\nservices:\n  app-native-osx:"
  },
  {
    "path": "default_monit/docker-sync.yml",
    "chars": 434,
    "preview": "version: \"2\"\n\noptions:\n  verbose: true\nsyncs:\n  appcode-native-osx-sync: # tip: add -sync and you keep consistent names "
  },
  {
    "path": "default_with_user/docker-compose-dev.yml",
    "chars": 369,
    "preview": "# this is our development docker-compose building on top of the production docker-compose, just mounting\n# the sync imag"
  },
  {
    "path": "default_with_user/docker-compose.yml",
    "chars": 196,
    "preview": "# This is our production compose file - not changed for docker-sync or similar\n\nversion: \"2\"\nservices:\n  app-native-osx:"
  },
  {
    "path": "default_with_user/docker-sync.yml",
    "chars": 306,
    "preview": "version: \"2\"\n\noptions:\n  verbose: true\nsyncs:\n  appcode-native-osx-sync: # tip: add -sync and you keep consistent names "
  },
  {
    "path": "docker-compose-only/docker-compose-dev.yml",
    "chars": 3044,
    "preview": "# This is our development docker-compose file, building on top of the prod one.\n# This file adds a synchronisation betwe"
  },
  {
    "path": "docker-compose-only/docker-compose.yml",
    "chars": 225,
    "preview": "# This is our production compose file - not changed for docker-sync or similar\n\nversion: \"2\"\nservices:\n  app-docker-comp"
  },
  {
    "path": "dynamic-configuration-dotnev/app/ignored_folder/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "dynamic-configuration-dotnev/app/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "dynamic-configuration-dotnev/app/some_folder/.ignored_dot_folder/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "dynamic-configuration-dotnev/app/some_folder/ignored_folder/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "dynamic-configuration-dotnev/app/some_folder/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "dynamic-configuration-dotnev/docker-compose-dev.yml",
    "chars": 410,
    "preview": "# this is our development docker-compose building on top of the production\n# docker-compose, just mounting the sync imag"
  },
  {
    "path": "dynamic-configuration-dotnev/docker-compose.yml",
    "chars": 192,
    "preview": "# This is our production compose file - not changed for docker-sync or similar\n\nversion: \"2\"\nservices:\n  app-unison:\n   "
  },
  {
    "path": "dynamic-configuration-dotnev/docker-sync.yml",
    "chars": 319,
    "preview": "version: \"2\"\n\noptions:\n  verbose: true\nsyncs:\n  #IMPORTANT: ensure this name is unique and does not match your other app"
  },
  {
    "path": "not_default_config_name/docker-compose-dev.yml",
    "chars": 369,
    "preview": "# this is our development docker-compose building on top of the production docker-compose, just mounting\n# the sync imag"
  },
  {
    "path": "not_default_config_name/docker-compose.yml",
    "chars": 196,
    "preview": "# This is our production compose file - not changed for docker-sync or similar\n\nversion: \"2\"\nservices:\n  app-native-osx:"
  },
  {
    "path": "not_default_config_name/docker-sync-special.yml",
    "chars": 286,
    "preview": "version: \"2\"\n\noptions:\n  verbose: true\nsyncs:\n  appcode-native-osx-sync: # tip: add -sync and you keep consistent names "
  },
  {
    "path": "rsync/app/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "rsync/docker-compose-dev.yml",
    "chars": 354,
    "preview": "# this is our development docker-compose building on top of the production docker-compose, just mounting\n# the sync imag"
  },
  {
    "path": "rsync/docker-compose.yml",
    "chars": 191,
    "preview": "# This is our production compose file - not changed for docker-sync or similar\n\nversion: \"2\"\nservices:\n  app-rsync:\n    "
  },
  {
    "path": "rsync/docker-sync.yml",
    "chars": 324,
    "preview": "version: \"2\"\noptions:\n  verbose: true\nsyncs:\n  #IMPORTANT: ensure this name is unique and does not match your other appl"
  },
  {
    "path": "simplest/app/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "simplest/docker-compose-dev.yml",
    "chars": 346,
    "preview": "# this is our development docker-compose building on top of the prodicker docker-compose, just mounting\n# the sync image"
  },
  {
    "path": "simplest/docker-compose.yml",
    "chars": 193,
    "preview": "# This is our production compose file - not changed for docker-sync or similar\n\nversion: \"2\"\nservices:\n  app-simplest:\n "
  },
  {
    "path": "simplest/docker-sync.yml",
    "chars": 215,
    "preview": "version: \"2\"\n\nsyncs:\n  #IMPORTANT: ensure this name is unique and does not match your other application container name\n "
  },
  {
    "path": "unison/app/ignored_folder/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "unison/app/index.html",
    "chars": 38,
    "preview": "aSome random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "unison/app/some_folder/.ignored_dot_folder/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "unison/app/some_folder/ignored_folder/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "unison/app/some_folder/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "unison/docker-compose-dev.yml",
    "chars": 357,
    "preview": "# this is our development docker-compose building on top of the production docker-compose, just mounting\n# the sync imag"
  },
  {
    "path": "unison/docker-compose.yml",
    "chars": 192,
    "preview": "# This is our production compose file - not changed for docker-sync or similar\n\nversion: \"2\"\nservices:\n  app-unison:\n   "
  },
  {
    "path": "unison/docker-sync.yml",
    "chars": 354,
    "preview": "version: \"2\"\n\noptions:\n  verbose: true\n  max_attempt: 30\nsyncs:\n  #IMPORTANT: ensure this name is unique and does not ma"
  },
  {
    "path": "unison-ftp-user/app/ignored_folder/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "unison-ftp-user/app/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "unison-ftp-user/app/some_folder/.ignored_dot_folder/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "unison-ftp-user/app/some_folder/ignored_folder/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "unison-ftp-user/app/some_folder/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "unison-ftp-user/docker-compose-dev.yml",
    "chars": 357,
    "preview": "# this is our development docker-compose building on top of the production docker-compose, just mounting\n# the sync imag"
  },
  {
    "path": "unison-ftp-user/docker-compose.yml",
    "chars": 192,
    "preview": "# This is our production compose file - not changed for docker-sync or similar\n\nversion: \"2\"\nservices:\n  app-unison:\n   "
  },
  {
    "path": "unison-ftp-user/docker-sync.yml",
    "chars": 436,
    "preview": "version: \"2\"\n\noptions:\n  verbose: true\nsyncs:\n  #IMPORTANT: ensure this name is unique and does not match your other app"
  },
  {
    "path": "unison-new-user/app/index.html",
    "chars": 5,
    "preview": "eugen"
  },
  {
    "path": "unison-new-user/docker-compose-dev.yml",
    "chars": 357,
    "preview": "# this is our development docker-compose building on top of the production docker-compose, just mounting\n# the sync imag"
  },
  {
    "path": "unison-new-user/docker-compose.yml",
    "chars": 216,
    "preview": "# This is our production compose file - not changed for docker-sync or similar\n\nversion: \"2\"\nservices:\n  app-unison:\n   "
  },
  {
    "path": "unison-new-user/docker-sync.yml",
    "chars": 438,
    "preview": "version: \"2\"\n\noptions:\n  verbose: true\nsyncs:\n  #IMPORTANT: ensure this name is unique and does not match your other app"
  },
  {
    "path": "unison-root-user/app/ignored_folder/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "unison-root-user/app/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "unison-root-user/app/some_folder/.ignored_dot_folder/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "unison-root-user/app/some_folder/ignored_folder/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "unison-root-user/app/some_folder/index.html",
    "chars": 37,
    "preview": "Some random HTML file hereasdasd\nNEW\n"
  },
  {
    "path": "unison-root-user/docker-compose-dev.yml",
    "chars": 357,
    "preview": "# this is our development docker-compose building on top of the production docker-compose, just mounting\n# the sync imag"
  },
  {
    "path": "unison-root-user/docker-compose.yml",
    "chars": 192,
    "preview": "# This is our production compose file - not changed for docker-sync or similar\n\nversion: \"2\"\nservices:\n  app-unison:\n   "
  },
  {
    "path": "unison-root-user/docker-sync.yml",
    "chars": 418,
    "preview": "version: \"2\"\n\noptions:\n  verbose: true\nsyncs:\n  #IMPORTANT: ensure this name is unique and does not match your other app"
  }
]

About this extraction

This page contains the full source code of the EugenMayer/docker-sync-boilerplate GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 74 files (19.8 KB), approximately 7.4k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!