To create new SSL certificates, run the following from the root directory and provide the necessary information on the command line:
openssl req -x509 -newkey rsa:4096 -nodes -out ssl/cert.pem -keyout ssl/key.pem -days 365To run the application locally, execute the following from the root directory:
uvicorn main:app --host 0.0.0.0 --port 443 --ssl-keyfile ssl/key.pem --ssl-certfile ssl/cert.pemThe API application can also be launched with fastapi:
fastapi run main.py --host 0.0.0.0 --port 80Build docker image:
docker build -t smith8ca/fastapi-container-app .Run the docker image:
docker run -d --name fastapi -p 443:443 smith8ca/fastapi-container-app