github.com/letsencrypt/boulder@v0.20251208.0/start.py (about) 1 #!/usr/bin/env -S python3 -u 2 """ 3 Run a local instance of Boulder for testing purposes. 4 5 Boulder always runs as a collection of services. This script will 6 start them all on their own ports (see test/startservers.py) 7 8 Keeps servers alive until ^C. Exit non-zero if any servers fail to 9 start, or die before ^C. 10 """ 11 12 import errno 13 import os 14 import sys 15 import time 16 17 sys.path.append('./test') 18 import startservers 19 20 if not startservers.install(race_detection=False): 21 raise(Exception("failed to build")) 22 23 if not startservers.start(): 24 sys.exit(1) 25 try: 26 os.wait() 27 28 # If we reach here, a child died early. Log what died: 29 startservers.check() 30 sys.exit(1) 31 except KeyboardInterrupt: 32 print("\nstopping servers.") 33 except OSError as v: 34 # Ignore EINTR, which happens when we get SIGTERM or SIGINT (i.e. when 35 # someone hits Ctrl-C after running `docker compose up` or start.py. 36 if v.errno != errno.EINTR: 37 raise