diff --git a/backend/server.py b/backend/server.py index 23508de..f67c2eb 100755 --- a/backend/server.py +++ b/backend/server.py @@ -241,13 +241,14 @@ def post_next_challenge(): if __name__ == "__main__": backend_port = os.environ["BACKEND_PORT"] - if os.environ["ENV"] == "prod": - from OpenSSL import SSL - - context = SSL.Context(SSL.TLSv1_2_METHOD) - context.use_privatekey_file('/etc/letsencrypt/live/dataframetrainer.com/privkey.pem') - context.use_certificate_chain_file('/etc/letsencrypt/live/dataframetrainer.com/fullchain.pem') - context.use_certificate_file('/etc/letsencrypt/live/dataframetrainer.com/cert.pem') - app.run(host='0.0.0.0', port=backend_port, threaded=True, ssl_context=context) - else: - app.run(host="0.0.0.0", port=backend_port, threaded=True) + # if os.environ["ENV"] == "prod": + # from OpenSSL import SSL + + # context = SSL.Context(SSL.TLSv1_2_METHOD) + # context.use_privatekey_file('/etc/letsencrypt/live/dataframetrainer.com/privkey.pem') + # context.use_certificate_chain_file('/etc/letsencrypt/live/dataframetrainer.com/fullchain.pem') + # context.use_certificate_file('/etc/letsencrypt/live/dataframetrainer.com/cert.pem') + # app.run(host='0.0.0.0', port=backend_port, threaded=True, ssl_context=context) + # else: + # app.run(host="0.0.0.0", port=backend_port, threaded=True) + app.run(host="0.0.0.0", port=backend_port, threaded=True) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index bf1628a..0ee88e5 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -3,7 +3,8 @@ version: "3.1" services: backend: ports: - - 5000:5000 + # we use nginx to proxy port 4999 to https://www.dataframetrainer.com:5000 + - 4999:5000 environment: ENV: "prod" BACKEND_PORT: 5000 @@ -15,7 +16,7 @@ services: dockerfile: Dockerfile.prod environment: NODE_ENV: production - ORIGIN: "https://www.dataframetrainer.com:5000" + ORIGIN: "https://www.dataframetrainer.com" ports: # The port of the website - 3000:3000