diff --git a/README.md b/README.md index 4ae9aee..5371954 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ portainer-cli create_stack -n stack_name -e 1 stack-test -f docker-compose.yml | `-n` or `-stack-name` | Stack name | | `-e` or `-endpoint-id` | Endpoint id (required) | | `-f` or `-stack-file` |Stack file | -| `-ef` or `-env-file` | Pass env file path, usually `.env` | +| `-w` or `-env-file` | Pass env file path, usually `.env` | ### update_stack command @@ -99,7 +99,7 @@ Where `var` is the environment variable name and `value` is the environment vari | `-s` or `-stack-id` | Stack id | | `-e` or `-endpoint-id` | Endpoint id (required) | | `-f` or `-stack-file` |Stack file | -| `-ef` or `-env-file` | Pass env file path, usually `.env` | +| `-w` or `-env-file` | Pass env file path, usually `.env` | | `-p` or `--prune` | Prune services | | `-c` or `--clear-env` | Clear all environment variables | @@ -108,7 +108,7 @@ Where `var` is the environment variable name and `value` is the environment vari Create or update a stack based on it's name. ```bash -portainer-cli create_or_update_stack -n stack_name -e endpoint_id -f stack_file [`-ef` or `-env-file`] +portainer-cli create_or_update_stack -n stack_name -e endpoint_id -f stack_file ``` **E.g:** @@ -120,7 +120,7 @@ portainer-cli update_stack -s 18 -e 1 -f docker-compose.yml #### Environment variables arguments ```bash -portainer-cli create_or_update_stack -n stack_name -e endpoint_id -f stack_file [`-ef` or `-env-file`]--env.var=value +portainer-cli create_or_update_stack -n stack_name -e endpoint_id -f stack_file --env.var=value ``` Where `var` is the environment variable name and `value` is the environment variable value. @@ -132,7 +132,7 @@ Where `var` is the environment variable name and `value` is the environment vari | `-n` or `-stack-name` | Stack name | | `-e` or `-endpoint-id` | Endpoint id (required) | | `-f` or `-stack-file` |Stack file | -| `-ef` or `-env-file` | Pass env file path, usually `.env` | +| `-w` or `-env-file` | Pass env file path, usually `.env` | | `-p` or `--prune` | Prune services | | `-c` or `--clear-env` | Clear all environment variables | diff --git a/portainer_cli/__init__.py b/portainer_cli/__init__.py index bfb224c..cb04902 100755 --- a/portainer_cli/__init__.py +++ b/portainer_cli/__init__.py @@ -274,7 +274,7 @@ class PortainerCLI(object): stack_name=('Stack name', 'option', 'n', str), endpoint_id=('Endpoint id', 'option', 'e', int), stack_file=('Stack file', 'option', 'f'), - env_file=('Environment Variable file', 'option', 'ef'), + env_file=('Environment Variable file', 'option', 'w'), prune=('Prune services', 'flag', 'p'), clear_env=('Clear all env vars', 'flag', 'c'), ) @@ -290,7 +290,7 @@ class PortainerCLI(object): stack_name=('Stack name', 'option', 'n'), endpoint_id=('Endpoint id', 'option', 'e', int), stack_file=('Environment Variable file', 'option', 'f') - env_file=('Environment Variable file', 'option', 'ef') + env_file=('Environment Variable file', 'option', 'w') ) def create_stack(self, stack_name, endpoint_id, stack_file, env_file='', *args): logger.info('Creating stack name={}'.format(stack_name)) @@ -393,7 +393,7 @@ class PortainerCLI(object): stack_id=('Stack id', 'option', 's', int), endpoint_id=('Endpoint id', 'option', 'e', int), stack_file=('Stack file', 'option', 'f'), - env_file=('Environment Variable file', 'option', 'ef'), + env_file=('Environment Variable file', 'option', 'w'), prune=('Prune services', 'flag', 'p'), clear_env=('Clear all env vars', 'flag', 'c'), )