![如何在使用“ecs-cli”创建的 AWS ECS 容器上配置 HTTPS?](https://linux22.com/image/1607427/%E5%A6%82%E4%BD%95%E5%9C%A8%E4%BD%BF%E7%94%A8%E2%80%9Cecs-cli%E2%80%9D%E5%88%9B%E5%BB%BA%E7%9A%84%20AWS%20ECS%20%E5%AE%B9%E5%99%A8%E4%B8%8A%E9%85%8D%E7%BD%AE%20HTTPS%EF%BC%9F.png)
你好,我使用以下命令配置 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?提前致谢!