Skip to main content

docker and docker-compose cli tool, to specify and automatic apply with current work directory

Project description

DDash

Purposes

docker and docker-compose cli tool, to specify and automatic apply with current work directory.

Installation

pip install ddash

Instruction

  • This program is using stdout and stderr which means it's able to support the next level deployment scripting.

  • Setup following variable in you enviroment to make it permanently:

    • DDASH_TIMEOUT: Execute cli timeout [default is None(never timeout)]
    • DDASH_PROJECT_DELIMITER: Project delimiter for extracting prefix [default: _(underscore)]
    • DDASH_PROJECT_SPLIT_LIMIT: Project prefix word number for extracting prefix [default: 1]
    • DDASH_ROOT_PATH: Workspace [default: $HOME]
    • DDASH_SUB_PATH: Group directory combine with ROOT_PATH, {PREFIX} will be replace with porject prefix
    • DDASH_SATELLITE_SUFFIX: Satellite container name [default: service]
    • DDASH_COMPOSE_FILENAME: docker-compose filename [default: docker-compose.yml]
    • DDASH_DOCKER_EXEC_COMMAND: docker exec command [default: bash]

Command

  • ps: List running containers, format table and grep rows
  • launch: Launch satellite container through project {PREFIX} which is extract from $PWD or --project, combine {SUFFIX} to up a satellite container [default: {PREFIX}_service]
  • terminate: Terminate satellite container through project {PREFIX} which is extract from $PWD or --project, combine {SUFFIX} to up a satellite container [default: {PREFIX}_service]
  • up: up container through project {PREFIX} which is extract from $PWD or --project, combine {SUFFIX} to up a satellite container [default: {PREFIX}_service]
  • down: down container through project {PREFIX} which is extract from $PWD or --project, combine {SUFFIX} to up a satellite container [default: {PREFIX}_service]
  • run: exec container with interactive tty mode through project {PREFIX} which is extract from $PWD or --project, combine {SUFFIX} to up a satellite container [default: {PREFIX}_service]

Update Logs

# date version
4 2022/04/14 v0.3.0
3 2022/02/02 v0.2.0
2 2022/01/31 v0.1.0
1 2022/01/20 v0.0.0

0.3.0

  • Merge pull request from Michael to fix color display issue.

0.2.0

  • Removed useless param DDASH_TIMEOUT.
  • Fixed _parse_sub_path get unexpected value None due to _SUB_PATH has no default value.

0.1.0

  • Adjust execute method, use subprocess.Popen(cmd, shell=True).wait() instead of subprocess.check_output() to avoid no reactions during a long term processing.

0.0.0

  • Add the following commands:
    • ps
    • launch
    • terminate
    • up
    • down
    • run

If you like my work, please consider buying me a coffee or PayPal Thanks for your support! Cheers! 🎉 Buy Me A Coffee

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ddash-0.3.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

ddash-0.3.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file ddash-0.3.0.tar.gz.

File metadata

  • Download URL: ddash-0.3.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.10

File hashes

Hashes for ddash-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b6091ccdf93fa31b2e93ed94108ac644c62b47aba599e8bcd0b8c63dd06405c4
MD5 07df49c60be6ca3d81437d50df078e0a
BLAKE2b-256 be2082c608eb43caeec95887385e3e4c4e219859447c73011339ded32cce5c58

See more details on using hashes here.

File details

Details for the file ddash-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: ddash-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.10

File hashes

Hashes for ddash-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ca29cb5264be6b9644c4fa405b1d5ba89c12f12924136c27448585f723fbae8
MD5 29e7f8baab16ae9a6a1671fd4d327c75
BLAKE2b-256 b617159fdd017053acfaac83cd355cc777dc1db4cfd683b4aad6477487694ce5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page