如何在使用“ecs-cli”创建的 AWS ECS 容器上配置 HTTPS?

如何在使用“ecs-cli”创建的 AWS ECS 容器上配置 HTTPS?

你好,我使用以下命令配置 Prisma GraphQL API 服务器用户 docker-compose 文件:ecs-cli compose up --create-log-groups --cluster-config myapp-api --ecs-profile myapp-api-profile

docker-compose.yml文件如下所示:

version: '3'
services:
  prisma:
    image: prismagraphql/prisma:1.34
    restart: always
    ports:
      - '443:443'
    environment:
      PRISMA_CONFIG: |
        port: 443
        databases:
          default:
            connector: mysql
            host: some-url.rds.amazonaws.com
            database: masvino-db
            port: 3306
            user: root
            password: password
  mysql:
    image: mysql:5.7.22
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: prisma
    volumes:
      - mysql:/var/lib/mysql
volumes:
  mysql: ~

容器正在运行,如您在此处所见:

$ ecs-cli ps --cluster-config myapp-api --ecs-profile myapp-api-profile
Name                                         State    Ports                      TaskDefinition  Health
2ca71c7d-b402-45f8-ac86-12b0b9b5ab89/prisma  RUNNING  34.210.43.29:443->443/tcp  Server:2        UNKNOWN
2ca71c7d-b402-45f8-ac86-12b0b9b5ab89/mysql   RUNNING                             Server:2        UNKNOWN

现在,我该如何配置 Prisma 容器以使用 HTTPS?提前致谢!

相关内容