Skip to content

Commit

Permalink
Use fixed container name to avoid issues with docker-compose versions
Browse files Browse the repository at this point in the history
  • Loading branch information
RealOrangeOne committed Aug 1, 2023
1 parent 6170cfc commit 34c3e41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ services:
context: .
restart: unless-stopped
command: "sleep infinity"
container_name: docker-db-auto-backup
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- ./backups:/var/backups
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@pytest.fixture
def run_backup(request: Any) -> Callable:
docker_client = docker.from_env()
backup_container = docker_client.containers.get("docker-db-auto-backup-backup-1")
backup_container = docker_client.containers.get("docker-db-auto-backup")

def clean_backups() -> None:
# HACK: Remove files from inside container to avoid permissions issue
Expand Down

0 comments on commit 34c3e41

Please sign in to comment.