Commit 334c4fc7 authored by Ai-Sasit's avatar Ai-Sasit

docker no secure

parent b3c76c29
......@@ -8,7 +8,4 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY ./server /code/server
COPY easykey.pem /code
COPY easycert.pem /code
CMD ["uvicorn", "server.core:app", "--host", "0.0.0.0", "--port", "443", "--ssl-keyfile", "./easykey.pem", "--ssl-certfile", "./easycert.pem", "--reload"]
CMD ["uvicorn", "server.core:app", "--host", "0.0.0.0", "--port", "80", "--reload"]
......@@ -6,7 +6,6 @@ services:
build: .
ports:
- "80:80"
- "443:443"
depends_on:
- mongodb
......
-----BEGIN CERTIFICATE-----
MIIE1jCCAz6gAwIBAgIQMbHFySO9BsjFZLHaBFTITDANBgkqhkiG9w0BAQsFADCB
kTEeMBwGA1UEChMVbWtjZXJ0IGRldmVsb3BtZW50IENBMTMwMQYDVQQLDCpBSS1T
QVNJVFxzYXNpdEBBaS1TYXNpdCAoU2FzaXQgV2lyYXRqaW5kYSkxOjA4BgNVBAMM
MW1rY2VydCBBSS1TQVNJVFxzYXNpdEBBaS1TYXNpdCAoU2FzaXQgV2lyYXRqaW5k
YSkwHhcNMjIxMTI1MDk1NzUxWhcNMjUwMjI1MDk1NzUxWjBeMScwJQYDVQQKEx5t
a2NlcnQgZGV2ZWxvcG1lbnQgY2VydGlmaWNhdGUxMzAxBgNVBAsMKkFJLVNBU0lU
XHNhc2l0QEFpLVNhc2l0IChTYXNpdCBXaXJhdGppbmRhKTCCASIwDQYJKoZIhvcN
AQEBBQADggEPADCCAQoCggEBAK7K7pR9KfUrDgn9JlIIYxi80jJEg2E+uYtVldbS
FSi8cNFZa4Qse5Tg6GiAit0QYZsAKYyxzByKVo/uUJOfiLMgAYQoV9x3VcIjbE6J
rVZHEyzbTGkg1N5C6DLTINJpPzc0fc8ne7K/m/FCHgtyoywuVSt/hkcU63yv16l4
4G//qbd4I4lFDYrX26liyDcRhCj53iAdRwxHuNJv8KWLQzbZjFV/wwXlblrHlVXq
t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CmVKYmd
/Y8MRqDBtu84OKEWe+bBbvFqPj6LEF0+bKb3uNtl7C2E5AxdhrOOLP5b46YXvgJD
H1MyTGeJ90+U//9ILySFRGnt6AqGxEDGf54xZuhBTxVA67i4qKZybykehrcCgYBo
K2Y6oM/NEzQg5DwPndxRFMhgAmS845AGxAfOyRIodmMUTiIsK06agyusIGVA9Vsi
oQ/G8Rw69WsT02oAVXRimLFPy5rYJ17aPeMr0WHljJOhH8+x3t5bjZKMeJgJgsSc
FIgWZC8M/1ZXEq94rEfT4n9MmVI1RKPpxTnCm13sxwKBgB7BS8virBtvbbP+Z3z5
y0vgFD5itJC3DlwtmPfbb7l0Fb9gv4AOFUzjXChi6+KSqjvcFR0JckdfFpFtalQw
ipumYRXkhKbv1fMW8ag9wETVGU/YrT8pXMD6pnVDWNmLwXq0GSiwnN8rE7RnBd3G
kSa+lZfLm+w7PzN6iYrl4fZm
-----END PRIVATE KEY-----
import uvicorn
if __name__ == "__main__":
uvicorn.run("server.core:app", host="0.0.0.0", reload=True, proxy_headers=True, ssl_certfile="easycert.pem", ssl_keyfile="easykey.pem", port=443)
\ No newline at end of file
uvicorn.run("server.core:app", host="0.0.0.0", reload=True, proxy_headers=True, port=80)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment