Python 烧瓶摇摇摆摆ui不';在AWS Fargate上部署后无法工作
在AWS Fargate上部署后不工作,我需要将Python 烧瓶摇摇摆摆ui不';在AWS Fargate上部署后无法工作,python,amazon-web-services,flask,swagger,Python,Amazon Web Services,Flask,Swagger,在AWS Fargate上部署后不工作,我需要将swagger.yml放在app.root\u路径中的/static文件夹中,我会这样做: SWAGGER_URL = '/dev/api/docs' API_URL = '/static/swagger.yml' swaggerui_blueprint = get_swaggerui_blueprint( SWAGGER_URL, API_URL, config={ 'app_name': "
swagger.yml
放在app.root\u路径
中的/static
文件夹中,我会这样做:
SWAGGER_URL = '/dev/api/docs'
API_URL = '/static/swagger.yml'
swaggerui_blueprint = get_swaggerui_blueprint(
SWAGGER_URL,
API_URL,
config={
'app_name': "API"
}
)
app.register_blueprint(swaggerui_blueprint)
在本地主机上,当我访问http://localhost:5000/dev/api/docs/
,甚至在我构建docker映像并在本地运行它之后。问题是当我实际将docker映像部署到AWS Fargate时。API正常工作(/dev/API/*
在负载平衡器上),但是当我访问文档时,它找不到/static/swagger.yml
:
有什么问题吗
编辑:完全错误
{
"schemaValidationMessages": [
{
"level": "error",
"message": "Can't read from file http://URL/static/swagger.yml"
}
]
}