Fix env file argument

This commit is contained in:
VALLEY Antoine (T0173847) 2019-07-23 17:28:00 +02:00
parent f67e36c5c5
commit 6fd3767cc7
2 changed files with 8 additions and 8 deletions

View file

@ -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 |

View file

@ -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'),
)