locked
multi-container rails/mysql app with docker-compose RRS feed

  • Question

  • I'm trying to make multi-container ruby on rails / MySQL app with docker-compose by referring the following.

    https://docs.microsoft.com/en-us/azure/app-service/containers/tutorial-multi-container-app

    I cannot make it well and it seems to be a problem with some network settings. So, let me ask you two questions.

    1. The above page, WordPress container specifies port "8000". However, we can access the page without specifying the port No. What is a mechanism? Should we always specify port 8000 or Azure automatically search the opened port number in docker-compose.yml? 
    2. In this page, the sample URL is always HTTP, not HTTPS. In the case of HTTPS, should we open a specific port number in docker-compose.yml? (Our environment in ***.azurewebsites.net is HTTPS in default.)
    Tuesday, December 4, 2018 9:36 AM

Answers

  • Shuji, I believe you are talking about the below section.

     ports:
           - "8000:80"

    This allows the YML to map the host port to the container port. In this case, traffic is able only ports 80 and 443 are supported for web apps. As a result, you shouldn't have to specify the port number when calling the service.

    In regards to using HTTPS, you will need to enforce HTTPS only for the container, under SSL settings, and then develop URL rewrite rules to convert any http requests into HTTPS requests.

    Wednesday, December 5, 2018 9:18 PM
    Owner

All replies

  • Shuji, I believe you are talking about the below section.

     ports:
           - "8000:80"

    This allows the YML to map the host port to the container port. In this case, traffic is able only ports 80 and 443 are supported for web apps. As a result, you shouldn't have to specify the port number when calling the service.

    In regards to using HTTPS, you will need to enforce HTTPS only for the container, under SSL settings, and then develop URL rewrite rules to convert any http requests into HTTPS requests.

    Wednesday, December 5, 2018 9:18 PM
    Owner
  • Thanks, Bryan!

    I understand that both port setting will be ignored.

    https://docs.microsoft.com/en-us/azure/app-service/containers/tutorial-multi-container-app#supported-options

    The above URL contents may be fixed ("port" is ignored).

    Thursday, December 6, 2018 4:01 AM