Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-sync -n should create dummy volumes for non-started syncs #807

Open
jlurena opened this issue Jul 8, 2022 · 0 comments
Open

docker-sync -n should create dummy volumes for non-started syncs #807

jlurena opened this issue Jul 8, 2022 · 0 comments

Comments

@jlurena
Copy link

jlurena commented Jul 8, 2022

Error/Feature Requestion/Docs

Context:

  • I have a monorepo
  • I have several syncs docker-sync.yml.
  • I have several services in docker-compose.yml
# docker-sync.yml
version: "2"
options:
  project_root: 'config_path'
syncs:
  api-docker-sync
    src: './api'
  web_app-docker-sync
    src: './webapp'
  web_app_v2-docker-sync
    src: './webapp_v2'
# docker-compose.yml
version: "3.9"
services:
  api:
    container_name: api
    build:
      context: .
      dockerfile: api/Dockerfile
    volumes:
      - api-docker-sync:/home/app/api
    ports:
      - 8000:8080

  web_app:
    container_name: web_app
    build:
      context: .
      dockerfile: web_app/Dockerfile
    volumes:
      - web_app-docker-sync:/home/app/web_app:nocopy
    ports:
      - 8080:8080

  web_app_v2:
    container_name: another_web_app
    build:
      context: .
      dockerfile: web_app/Dockerfile
    volumes:
      - web_app-docker-sync:/home/app/web_app_v2:nocopy
    ports:
      - 8080:8080
volumes:
  api-docker-sync-docker-sync:
    external: true
  web_app-docker-sync:
    external: true
  web_app_v2-docker-sync:
    external: true

Expectation

  1. I should be able to start sync on only apps that I am working on
    • docker-sync start -n api-docker-sync-docker-sync && docker-sync start -n web_app_v2-docker-sync
    • docker-compose up api web_app_v2

Instead, I get the following error:
external volume "web_app-docker-sync" not found

Potential Solution

  1. docker-sync should create empty volumes for non-started syncs.

I'd love to help with this. Will take me some time to ramp up and understand this though. If anyone can point me in right direction or help with this, that'd be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants