2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-10 07:11:00 +00:00

Remove pwd for now

This commit is contained in:
Lev Vereshchagin 2021-12-17 11:25:25 +03:00
parent 76fd114480
commit 7711613f05

View File

@ -1,43 +0,0 @@
import shutil
import subprocess
from get_latest_tags import get_latest_tag, update_env
def prepare_env():
version = "13"
frappe_tag = get_latest_tag("frappe", version)
erpnext_tag = get_latest_tag("erpnext", version)
shutil.copyfile("example.env", ".env")
update_env(".env", frappe_tag, erpnext_tag)
def generate_compose_file():
output = subprocess.check_output(
(
"docker-compose",
"-f",
"compose.yaml",
"-f",
"overrides/compose.erpnext.yaml",
"--env-file",
".env",
"config",
),
encoding="UTF-8",
)
text = f'version: "3.9"\n\n{output}'
with open("pwd.yml", "a+") as f:
f.seek(0)
f.truncate()
f.write(text)
def main() -> int:
prepare_env()
generate_compose_file()
return 0
if __name__ == "__main__":
raise SystemExit(main())