Collection of invoke commands used by Saritasa
Project description
saritasa-invocations
Collection of invoke commands used by Saritasa
Installation
pip install saritasa-invocations
or if you are using poetry
poetry add saritasa-invocations
Configuration
Configuration can be set in tasks.py
file.
Below is an example of config:
from invoke import Collection
from saritasa_invocations import (
docker,
git,
github_actions,
pre_commit,
system,
)
ns = Collection(
docker,
git,
github_actions,
pre_commit,
system,
)
# Configurations for run command
ns.configure(
dict(
run=dict(
pty=True,
echo=True,
),
saritasa_invocations={
"pre_commit_hooks": (
"pre-commit",
"pre-push",
"commit-msg",
),
"merge_ff": "true",
"pull_ff": "only",
"docker-main-container" = [
"opensearch",
"redis",
],
"vs_code_settings_template": ".vscode/recommended_settings.json",
"settings_template": "config/.env.local",
"save_settings_from_template_to": "config/.env",
},
),
)
Modules
system
copy-local-settings
Copies local template for settings into specified file
Settings:
settings_template
path to settings template (Default:config/settings/local.template.py
)save_settings_from_template_to
path to where save settings (Default:config/settings/local.py
)
copy-local-settings
Copies local template for vscode settings into .vscode
folder
Settings:
vs_code_settings_template
path to settings template (Default:.vscode/recommended_settings.json
)
chown
Change owner ship of project files to current user.
Shortcut for owning apps dir by current user after some files were generated using docker-compose (migrations, new app, etc).
create-tmp-folder
Create folder for temporary files(.tmp
).
git
set-git-setting
Set git setting in config
setup
Preform setup of git:
- Install pre-commit hooks
- Set merge.ff
- Set pull.ff
Settings:
merge_ff
setting value formerge.ff
(Default:false
)pull_ff
setting value forpull.ff
(Default:only
)
pre-commit
install
Install git hooks via pre-commit.
Settings:
pre_commit_hooks
list of hooks to install (Default:["pre-commit", "pre-push", "commit-msg"]
)
run-hooks
Run all hooks against all files
docker
build-service
Build service image from docker compose
buildpack
Build project via pack-cli
Settings:
buildpack_builder
image tag of builder (Default:paketobuildpacks/builder:base
)buildpack_runner
image tag of runner (Default:paketobuildpacks/run:base
)build_image_tag
image tag of builder (Default: Name of project fromproject_name
)buildpack_requirements_path
path to folder with requirements (Default:requirements
)
stop-all-containers
Shortcut for stopping ALL running docker containers
up
Bring up main containers and start them.
Settings:
docker_main_containers
image tag of builder (Default:["postgres", "redis"]
)
stop
Stop main containers.
Settings:
docker_main_containers
image tag of builder (Default:["postgres", "redis"]
)
clear
Stop and remove all containers defined in docker-compose. Also remove images.
github-actions
set-up-host
Set up host in /etc/hosts
set-up-hosts
Add hosts to /etc/hosts
.
Settings:
github_action_hosts
image tag of builder (Default: seedocker-main-containers
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for saritasa_invocations-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7b72d49a2abb2f8330e2ee68a130eed4d55c79bccff4d066444ab6a07fad308 |
|
MD5 | 41b9449f641785029be989277983a56f |
|
BLAKE2b-256 | b412744cda49d205c711a1895a352eac2419e5ea8cc6584f396ff34d6c597f81 |
Hashes for saritasa_invocations-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60d162b0986f49d333135aba8fab640a6ee90f86480b9c7b2b94b8e478399386 |
|
MD5 | 4ab56e12dd0b4008e8e8f103d7220508 |
|
BLAKE2b-256 | a7926d64e1afce0b6d00e1a37a0b24fba7de6cc4ed6c0464a2f865a31ec952a9 |