-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from audioboxer217/feature/justfile
- Loading branch information
Showing
4 changed files
with
58 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
dev: | ||
domain: okchmp24.kseppler.com | ||
certificate_arn: arn:aws:acm:us-east-1:799879571353:certificate/08dcf05b-792c-4bea-b7d5-75acc69a5813 | ||
app_function: app.app | ||
aws_region: us-east-1 | ||
profile_name: personal | ||
project_name: frontend | ||
runtime: python3.11 | ||
s3_bucket: zappa-okc-chmp-frontend-dev | ||
http_methods: | ||
- GET | ||
- POST | ||
remote_env: s3://okchmp-dev-reg-config/frontend.json | ||
parameter_depth: 1 | ||
memory_size: 512 | ||
use_precompiled_packages: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
python_ver := '3.11.5' | ||
python_subdir := if os_family() == "windows" { "/Scripts" } else { "/bin" } | ||
python_exec := if os_family() == "windows" { "/python.exe" } else { "/python3" } | ||
system_python := if os_family() == "windows" { ".pyenv/shims" } else { "${HOME}/.pyenv/versions/" + python_ver + "/bin/python3" } | ||
zappa := './.venv/' + python_subdir + '/zappa' | ||
|
||
default: | ||
@just --list | ||
|
||
# Bootstrap Python Env. Valid Types: 'deploy' & 'dev' | ||
bootstrap venv_dir='.venv' type="deploy": | ||
if test ! -e {{ venv_dir }}; then {{ system_python }} -m venv {{ venv_dir }}; fi | ||
./{{ venv_dir }}{{ python_subdir }}{{ python_exec }} -m pip install --upgrade pip | ||
./{{ venv_dir }}{{ python_subdir }}{{ python_exec }} -m pip install --upgrade -r requirements.txt {{ if type == 'dev' { '-r dev_requirements.txt' } else { '' } }} | ||
|
||
_aws_login AWS_PROFILE: | ||
@aws --profile {{ AWS_PROFILE }} sts get-caller-identity || aws sso login | ||
|
||
_zappa CMD ACCT ENV: | ||
@just _aws_login "$(yq '.{{ ENV }}.profile_name' envs/{{ ACCT }}.yml)" | ||
{{ zappa }} {{ CMD }} -s envs/{{ ACCT }}.yml {{ ENV }} | ||
|
||
# Deploy new environment | ||
deploy ACCT='test' ENV='dev': (_zappa "deploy" ACCT ENV) | ||
|
||
# Certify new environment | ||
certify ACCT='test' ENV='dev': (_zappa "certify" ACCT ENV) | ||
|
||
# Update existing environment | ||
update ACCT='test' ENV='dev': (_zappa "update" ACCT ENV) | ||
|
||
# Check status of existing environment | ||
status ACCT='test' ENV='dev': (_zappa "status" ACCT ENV) | ||
|
||
# Check logs of running environment | ||
logs ACCT='test' ENV='dev': (_zappa "tail" ACCT ENV) | ||
|
||
# Undeploy a running environment | ||
undeploy ACCT='test' ENV='dev': (_zappa "undeploy" ACCT ENV) |