Add Docker build/push tooling and Traefik compose
This commit is contained in:
26
docker/build_and_push_image.py
Normal file
26
docker/build_and_push_image.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def main() -> int:
|
||||
script_dir = Path(__file__).resolve().parent
|
||||
scripts = ["build_image.py", "push_image.py"]
|
||||
|
||||
for script in scripts:
|
||||
script_path = script_dir / script
|
||||
print(f"Executing {script}...")
|
||||
try:
|
||||
subprocess.run([sys.executable, str(script_path)], check=True)
|
||||
print(f"{script} executed successfully.\n")
|
||||
except subprocess.CalledProcessError as error:
|
||||
print(f"Error: {script} failed with exit code {error.returncode}.")
|
||||
return error.returncode
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user