Make port configurable
This commit is contained in:
parent
6b2b8bb1b3
commit
f69667c09f
|
@ -15,4 +15,4 @@ COPY main.py .
|
|||
EXPOSE 5000
|
||||
|
||||
# Command to run the application
|
||||
CMD ["python", "main.py"]
|
||||
CMD ["python", "main.py", "--port", "5000"]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import argparse
|
||||
from flask import Flask, request, render_template_string, redirect, url_for
|
||||
from cryptography import x509
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
|
@ -78,4 +79,7 @@ def index():
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(debug=True, port=5000, host='0.0.0.0')
|
||||
parser = argparse.ArgumentParser(description="Run SSL Certificate Decoder")
|
||||
parser.add_argument('--port', type=int, default=5000, help='Port to run the service on')
|
||||
args = parser.parse_args()
|
||||
app.run(debug=True, port=args.port, host='0.0.0.0')
|
||||
|
|
Loading…
Reference in New Issue