【以下的问题经过翻译处理】 我使用Django-cookiecutter构建了我的Docker Django应用程序(它会生成一个准备好用于生产的引导应用程序)。在我的本地机器上应用程序没有错误,可以正常运行。我将生产映像推送到AWS ECR中,使用docker context ecs部署应用程序。我面临的问题是它开始创建所有实例,过一会又开始删除它们。我无法确定问题出在哪里。我在这方面是个初学者,将非常感激任何协助。这是我的YAML文件。```version: '3'
volumes:
production_postgres_data: {}
production_postgres_data_backups: {}
production_traefik: {}
services:
django: &django
build:
context: .
dockerfile: ./compose/production/django/Dockerfile
image: public.ecr.aws/t6g1j7b6/image_converter:django
platform: linux/x86_64
depends_on:
- postgres
- redis
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
command: /start
networks:
- proxy
- default
postgres:
build:
context: .
dockerfile: ./compose/production/postgres/Dockerfile
image: public.ecr.aws/t6g1j7b6/image_converter:postgres
volumes:
- production_postgres_data:/var/lib/postgresql/data:Z
- production_postgres_data_backups:/backups:z
env_file:
- ./.envs/.production/.postgres
traefik:
build:
context: .
dockerfile: ./compose/production/traefik/Dockerfile
image: public.ecr.aws/t6g1j7b6/image_converter:traefik
depends_on:
- django
volumes:
- production_traefik:/etc/traefik/acme
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"
- "0.0.0.0:5555:5555"
redis:
image: public.ecr.aws/t6g1j7b6/image_converter:redis
celeryworker:
<<: *django
image: public.ecr.aws/t6g1j7b6/image_converter:celeryworker
command: /start-celeryworker
celerybeat:
<<: *django
image: public.ecr.aws/t6g1j7b6/image_converter:celerybeat
command: /start-celerybeat
flower:
<<: *django
image: public.ecr.aws/t6g1j7b6/image_converter:flower
command: /start-flower
networks:
proxy:```