0

I was trying to convert this service defined in docker-compose.yaml into a AWS Copilot manifest without any success.

  # backend - test-engine
  test-engine:
    image: verify:0.9
    restart: always
    depends_on:
      - redis
    working_dir: /app/verify/test-engine-app
    command: python3 -m test_engine_app
    volumes:
      - plugins-volume:/app/verify/ai-verify-portal/plugins
      - logs-volume:/app/verify/test-engine-app/logs
      - uploads-data-volume:/app/verify/uploads/data
      - uploads-model-volume:/app/verify/uploads/model
    networks:
      - app-network

Since I wasn't able to see any way of mapping the volumes inside the manifest, I added them to the Dockerfile for this container.

# Create and map volumes
VOLUME /app/verify/ai-verify-portal/plugins
VOLUME /app/verify/test-engine-app/logs
VOLUME /app/verify/uploads/data
VOLUME /app/verify/uploads/model

The manifest.yaml for the service looks like this

# Your service name will be used in naming your resources like log groups, ECS services, etc.
name: test-engine
type: Backend Service

# Your service does not allow any traffic.

# Configuration for your containers and service.
image:
  # Docker build arguments. For additional overrides: https://aws.github.io/copilot-cli/docs/manifest/backend-service/#image-build
  build: 
    dockerfile: ../verify/setup-verify/verify-user/Dockerfile

command: ["cd /app/verify/test-engine-app","python3 -m test_engine_app"]


network:
  connect: true
cpu: 1024
memory: 2048
count:
  spot: 1
exec: true


# storage:
  # readonly_fs: true       # Limit to read-only access to mounted root filesystems.

storage:
  volumes:
    volume:
      path: /app/verify/
      read_only: false
      efs: true

The deployment fails to start the container and I was unable to fetch any logs from cloudwatch as the log group does not seem to have any logs.

Any suggestions on how to get the docker-compose translated to the manifest for AWS Copilot?

0 Answers0