gen command
Generate supporting files for Tethys installations.
Note
The package_json
option is designed to be used when setting the STATICFILES_USE_NPM
setting to True
, which requires that the Tethys Portal JavaScript dependencies be served by Tethys. The package_json
command will generate a package.json
and then run npm install
to download the JS dependencies.
usage: tethys gen [-h] [-d DIRECTORY] [-p {major,minor,patch,none}] [--micro]
[--client-max-body-size CLIENT_MAX_BODY_SIZE]
[--asgi-processes ASGI_PROCESSES]
[--conda-prefix CONDA_PREFIX] [--tethys-port TETHYS_PORT]
[--web-server-port SERVER_PORT] [--micromamba] [--overwrite]
[--ssl] [--ssl-cert-path SSL_CERT] [--ssl-key-path SSL_KEY]
[--ip-address IP_ADDRESS]
[--additional-directive ADDITIONAL_DIRECTIVES]
[--run-as-user RUN_AS_USER]
{apache,apache_service,asgi_service,nginx,nginx_service,portal_config,secrets,services,install,metayaml,package_json,requirements}
Positional Arguments
- type
Possible choices: apache, apache_service, asgi_service, nginx, nginx_service, portal_config, secrets, services, install, metayaml, package_json, requirements
The type of object to generate.
Named Arguments
- -d, --directory
Destination directory for the generated object.
- -p, --pin-level
Possible choices: major, minor, patch, none
Level to pin dependencies when generating the meta.yaml. One of "major", "minor", "patch", or "none". Defaults to "none".
Default:
'none'
- --micro
Use micro-tethys dependencies when generating the meta.yaml.
Default:
False
- --client-max-body-size
Populate the client_max_body_size parameter for nginx config. Defaults to "75M".
Default:
'75M'
- --asgi-processes
The maximum number of asgi worker processes. Defaults to 1.
Default:
1
- --conda-prefix
The path to the Tethys conda environment. Required if $CONDA_PREFIX is not defined.
Default:
False
- --tethys-port
Port for the Tethys Server to run on in production. This is used when generating the Daphne, Nginx, and Apache configuration files. Defaults to 8000.
Default:
8000
- --web-server-port
Port for the proxy web server (i.e. Apache or Nginx) to listen on in production. This is used when generating the Apache configuration files. Defaults to 80 (or 443 if the --ssl option is used).
- --micromamba
Generate files to work in a Micromamba environment. Used when generating the configuration files for a Docker build (the Docker image uses the micromamba image as the base image).
Default:
False
- --overwrite
Overwrite existing file without prompting.
Default:
False
- --ssl
Add configuration settings for serving with SSL/HTTPS. Used for the Apache configuration file.
Default:
False
- --ssl-cert-path
Path to the certificate to use for SSL termination.Used for the Apache configuration file. Defaults to ''.
Default:
''
- --ssl-key-path
Path to the key to use for SSL termination.Used for the Apache configuration file. Defaults to ''.
Default:
''
- --ip-address
IP address for web server.Used for security with the 'ssl' option in the Apache configuration file. Defaults to ''.
Default:
''
- --additional-directive
Additional configuration directives to add to the Apache configuration file. Defaults to ''.
Default:
[]
- --run-as-user
The user to run the Supervisor Apache service as. Defaults to 'root'.
Default:
'root'