question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't deploy using docker swarm. ERROR: The Compose file './compose.yaml' is invalid because:

See original GitHub issue

Description of the issue

Can’t deploy using docker-swarm using the guide.

Context information (for bug reports)

OS: Almalinux 8 (CentOS 8 alternative) Docker version 20.10.13, build a224086 docker-compose version 1.27.4, build 40524192 yq (https://github.com/mikefarah/yq/) version 4.22.1

Steps to reproduce the issue

  1. Clone project and cd to the directory.
git clone https://github.com/frappe/frappe_docker
cd frappe_docker
  1. Copy example.env to .env.
cp example.env .env
  1. Follow the swarm guide.
docker-compose -f compose.yaml \
  -f overrides/compose.erpnext.yaml \
  -f overrides/compose.swarm.yaml \
  -f overrides/compose.https.yaml \
  config \
  | yq eval 'del(.services.*.depends_on) | del(.services.frontend.labels)' - \
  | yq eval '.services.proxy.command += "--providers.docker.swarmmode"' - > \
  ~/gitops/compose.yaml

Observed result

The Docker swarm doesn’t start.

Expected result

The swarm should just start.

Stacktrace / full error message if available

no such file or directory: /home/user/gitops/compose.yaml
ERROR: The Compose file './compose.yaml' is invalid because:
services.backend.depends_on.configurator.condition contains "service_completed_successfully", which is an invalid type, it should be a service_started, or a service_healthy
services.queue-default.depends_on.configurator.condition contains "service_completed_successfully", which is an invalid type, it should be a service_started, or a service_healthy
services.queue-long.depends_on.configurator.condition contains "service_completed_successfully", which is an invalid type, it should be a service_started, or a service_healthy
services.queue-short.depends_on.configurator.condition contains "service_completed_successfully", which is an invalid type, it should be a service_started, or a service_healthy
services.scheduler.depends_on.configurator.condition contains "service_completed_successfully", which is an invalid type, it should be a service_started, or a service_healthy
services.websocket.depends_on.configurator.condition contains "service_completed_successfully", which is an invalid type, it should be a service_started, or a service_healthy

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
RashiqAzhancommented, Mar 18, 2022

I’ll try to setup and improve docs. I’ve not run through swarm docs in live environment anywhere.

Would really appreciate the update. ERPNext works fine on local machines but getting it deployed on a VPS has been quite a challenge.

0reactions
revantcommented, Apr 6, 2022

move discussion to #717

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ask Question - Stack Overflow
The Compose file './docker-compose.yml' is invalid because: Unsupported config option · 3. The networks: block at the end looks indented one step ...
Read more >
Compose file version 3 reference - Docker Documentation
The Compose file is a YAML file defining services, networks and volumes. ... is ignored when deploying a stack in swarm mode with...
Read more >
Sign in - YouTube
docker - compose. yml" is invalid. You might be seeing this error because you're using the wrong Compose file version.
Read more >
Docker stack deploy with compose-file results in invalid mount ...
All you need to do is to specify correct path for your volume. You can create a separate file and call it docker-compose-production.yml...
Read more >
Error trying to add new site in Docker - ERPNext Forum
In case of single docker-compose file, it includes traefik already, creating it again will cause error. Use docker swarm setup if you plan...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found