Skip to content

Commit

Permalink
help message and readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
sadeghmohebbi committed Jan 15, 2021
1 parent 52af7e3 commit cd5ce2f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,44 @@
# Docker Compose Port Mapping Manager
simply add or remove port mapping options via command line on docker compose yaml file

## Installation

you should have device nodejs+npm installed

```bash
npm -g install docker-compose-port-mapping-manager
```

## Usage

if you want to add port 8080 mapping to 80 of nginx and remove existing 80:80 mapping, run command below
```bash

docker-compose-port-mapping-manager --delete 80:80 --from nginx --add 8080:80 --to nginx
```

## See Help

```bash
docker-compose-port-mapping-manager --help

adding or removing ports from docker compose yaml file via command line

Usage
$ docker-compose-port-mapping-manager <input>

Options
--input, -i base docker compose yaml file (default: docker-compose.yml)
--output, -o target docker compose yaml file (default: docker-compose.overwrite.yml)
--delete, -D delete ports action
--add, -A add ports mapping action
--to-service, --to selected service to add ports mapping option
--from-service, --from selected service to delete ports mapping option

Example:
remove 80->80 port mapping and add 8080->80 as a replacement to nginx service
$ docker-compose-port-mapping-manager --delete 80:80 --from nginx --add 8080:80 --to nginx
```

## License
```
Expand Down
4 changes: 2 additions & 2 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Options \n \
--output, -o target docker compose yaml file (default: docker-compose.overwrite.yml) \n \
--delete, -D delete ports action \n \
--add, -A add ports mapping action \n \
--to-service, -to selected service to add ports mapping option \n \
--from-service, -from selected service to delete ports mapping option \n \
--to-service, --to selected service to add ports mapping option \n \
--from-service, --from selected service to delete ports mapping option \n \
\n \
Example: \n \
remove 80->80 port mapping and add 8080->80 as a replacement to nginx service \n \
Expand Down

0 comments on commit cd5ce2f

Please sign in to comment.