add requirement for sensitive.py
This commit is contained in:
parent
61743a5050
commit
d292cbfb08
@ -13,6 +13,7 @@ PaaS - creates easily deployable declarative web applications with (moslty) file
|
|||||||
|
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
* [ ] [prod_install] Download sensitive prompt
|
||||||
* [ ] [vm_gen] Auto generate dependency graph for `view_models/_process_order`
|
* [ ] [vm_gen] Auto generate dependency graph for `view_models/_process_order`
|
||||||
* [ ] [auto_dns] Start and test `auto_dns.service`
|
* [ ] [auto_dns] Start and test `auto_dns.service`
|
||||||
* [ ] [migrations] ALTER doesn't work with sqlite3
|
* [ ] [migrations] ALTER doesn't work with sqlite3
|
20
oshipka.sh
20
oshipka.sh
@ -12,6 +12,7 @@ Usage $0 [ bootstrap | model | db_migrate | db_upgrade | db_populate | db_recrea
|
|||||||
|
|
||||||
bootstrap [PROJECT_PATH] Create a new project in PROJECT_PATH
|
bootstrap [PROJECT_PATH] Create a new project in PROJECT_PATH
|
||||||
init Install dev env
|
init Install dev env
|
||||||
|
download_sensitive Download sensitive
|
||||||
|
|
||||||
model Create or update a model from files in webapp/view_models/*.yaml
|
model Create or update a model from files in webapp/view_models/*.yaml
|
||||||
db_migrate DB migration
|
db_migrate DB migration
|
||||||
@ -58,10 +59,21 @@ link_dev_oshipka() {
|
|||||||
pip install -e ${TWW_PATH}
|
pip install -e ${TWW_PATH}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
download_sensitive() {
|
||||||
|
if [ ! -f sensitive.py ]; then
|
||||||
|
echo "File sensitive.py NOT FOUND"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
init_venv
|
init_venv
|
||||||
install_reqs
|
install_reqs
|
||||||
link_dev_oshipka
|
link_dev_oshipka
|
||||||
|
mkdir -p data
|
||||||
|
db_upgrade
|
||||||
|
download_sensitive
|
||||||
|
db_populate
|
||||||
}
|
}
|
||||||
|
|
||||||
install_cert() {
|
install_cert() {
|
||||||
@ -121,7 +133,11 @@ run_in_prod() {
|
|||||||
|
|
||||||
prod_install() {
|
prod_install() {
|
||||||
shift
|
shift
|
||||||
sudo apt install nginx dnsutils
|
if [ ! -f ${OSHIPKA_PATH}/provision/auto_dns/sensitive.py ]; then
|
||||||
|
echo "File ${OSHIPKA_PATH}/provision/auto_dns/sensitive.py NOT FOUND"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
sudo apt install -y nginx dnsutils
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
PROJECT_NAME=$(basename `pwd`)
|
PROJECT_NAME=$(basename `pwd`)
|
||||||
echo "1/6 Generating service and config files..."
|
echo "1/6 Generating service and config files..."
|
||||||
@ -269,6 +285,8 @@ command_main() {
|
|||||||
;;
|
;;
|
||||||
init) init "$@"
|
init) init "$@"
|
||||||
;;
|
;;
|
||||||
|
download_sensitive) download_sensitive "$@"
|
||||||
|
;;
|
||||||
worker) worker "$@"
|
worker) worker "$@"
|
||||||
;;
|
;;
|
||||||
web) web "$@"
|
web) web "$@"
|
||||||
|
@ -14,6 +14,7 @@ MAX_UPLOAD_SIZE = "10m"
|
|||||||
oshipka_path = os.environ.get('OSHIPKA_PATH')
|
oshipka_path = os.environ.get('OSHIPKA_PATH')
|
||||||
TEMPLATES_PATH = os.path.join(oshipka_path, "provision", "templates")
|
TEMPLATES_PATH = os.path.join(oshipka_path, "provision", "templates")
|
||||||
TMP_PATH = os.path.join(oshipka_path, "provision", "tmp")
|
TMP_PATH = os.path.join(oshipka_path, "provision", "tmp")
|
||||||
|
os.makedirs(TMP_PATH, exist_ok=True)
|
||||||
shutil.rmtree(TMP_PATH)
|
shutil.rmtree(TMP_PATH)
|
||||||
os.makedirs(TMP_PATH, exist_ok=True)
|
os.makedirs(TMP_PATH, exist_ok=True)
|
||||||
env = Environment(
|
env = Environment(
|
||||||
|
Loading…
Reference in New Issue
Block a user