https://github.com/zbejas/portmapper
Simple port mapping utility, written in python.
https://github.com/zbejas/portmapper
docker-compose ports
Last synced: 4 days ago
JSON representation
Simple port mapping utility, written in python.
- Host: GitHub
- URL: https://github.com/zbejas/portmapper
- Owner: zbejas
- License: gpl-3.0
- Created: 2022-09-26T21:43:05.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-09-26T23:58:57.000Z (about 3 years ago)
- Last Synced: 2025-03-24T18:35:40.931Z (7 months ago)
- Topics: docker-compose, ports
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.md
Awesome Lists containing this project
README
# PortMapper
Simple port mapping utility, written in python.
## Usage
Move the `portmapper.py` file to the directory where your stacks folders are located and run it using:
```bash
python3 portmapper.py
```This will create a `ports.md` file next to the script file.
File tree example:
```
project
│
└───stack1
| │ docker-compose.yml
│
└───stack2
| │ docker-compose.yml
|
└───stack3
| │ docker-compose.yml
|
| portmapper.py
| ports.md
```The script will skip the stacks with no ports.
## Note
This script assumes all of the containers in the stack have `container_name` field before the `ports` field.