A wrapper for docker-compose that adds a network to all services.
Project description
Docker Network Integration Script (ncomp)
Overview
This script is designed to streamline the process of integrating a custom network into Docker Compose services. It automates the task of adding a specified network to all services in a Docker Compose file and ensures the network is properly defined and recognized by Docker Compose.
Features
- Automatic Network Creation: Creates a Docker network if it does not already exist.
- Dynamic Network Integration: Adds a specified network to all services in a Docker Compose file.
- Custom Network Support: Supports custom network names as specified by the user environment.
- Error Handling: Provides error output if the Docker Compose process encounters issues.
Requirements
- Python 3.x
- Docker Python SDK
- PyYAML
Environment Variables
SHARED_NETWORK: The name of the network to be integrated into Docker Compose services. Default is "shared_network".COMPOSE_FILE: The path to the Docker Compose file. Default is "docker-compose.yml".
Usage
- Set Environment Variables (optional): Define
SHARED_NETWORKandCOMPOSE_FILEif you want to use custom values. - Run the Script: Execute the script in the same directory as your Docker Compose file or specify the path using the
COMPOSE_FILEenvironment variable.
Example
# Run with custom network name and Docker Compose file
SHARED_NETWORK=my_network COMPOSE_FILE=my_docker_compose.yml ncomp up
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ncomp-0.1.0.tar.gz.
File metadata
- Download URL: ncomp-0.1.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
416fa3efc6a26548b7e656bcaa5df442ca6ea2c9c7bcc030e083078f1e0b5254
|
|
| MD5 |
6640efa4b7533fa8225093e5d1988cbd
|
|
| BLAKE2b-256 |
b998851c5b2efbd9ad0e4fea1d2052a20fc570e190afdd425842c943ccf90b48
|
File details
Details for the file ncomp-0.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: ncomp-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3ba802ca18fefab7ff98b2dbde613da87f5f6bf7c76f33d24d325134ca79f08
|
|
| MD5 |
59eacf92c448c087c63e2791dc91841f
|
|
| BLAKE2b-256 |
5cc87d3008f34e318fc87a485281a2f8f9be8ef4174b433e7ab26fa7ad864f8e
|