Skip to content

Swarm mode and single container #43

Description

@jwaes

When i enable SWARM_MODE everything works fine with labels in other stacks. But when i add a label to a single container in the docker host i get this error:

2024-02-15 09:42:42,947 - INFO: ------------------------- Detected Config -------------------------
2024-02-15 09:42:42,949 - INFO: service: web
2024-02-15 09:42:42,950 - INFO:  - volume: /var/lib/docker/volumes/restic-backup_test/_data -> /volumes/restic-backup/web/srv/tests
2024-02-15 09:42:42,951 - INFO: service: None
Traceback (most recent call last):
  File "/usr/bin/rcb", line 33, in <module>
    sys.exit(load_entry_point('restic-compose-backup', 'console_scripts', 'rcb')())
  File "/restic-compose-backup/restic_compose_backup/cli.py", line 30, in main
    status(config, containers)
  File "/restic-compose-backup/restic_compose_backup/cli.py", line 102, in status
    container.get_volume_backup_destination(mount, '/volumes'),
  File "/restic-compose-backup/restic_compose_backup/containers.py", line 245, in get_volume_backup_destination
    destination /= project_name
  File "/usr/lib/python3.7/pathlib.py", line 925, in __truediv__
    return self._make_child((key,))
  File "/usr/lib/python3.7/pathlib.py", line 704, in _make_child
    drv, root, parts = self._parse_args(args)
  File "/usr/lib/python3.7/pathlib.py", line 658, in _parse_args
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
ERROR: 1

Need some defaults for projectname and for service name for not docker-compose containers.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions