Open chrisbecke opened 2 years ago
I am actually having a similar issue
WARNING services.scale: unsupported attribute
ECS Fargate does not support bind mounts from host: incompatible attribute
This repo is about docker compose, not "cloud integration". @glours could you please transfert to docker/compose-cli?
I am having a similar issue as @ssensalo.
AWS does seem to support bind mounts on Fargate now - however it seems that the validation this repo conducts still forbids it.
Hello @ShaanHash and @chrisbecke Hoping that ECS Compose-X might be able to workaround that problem for you using simple docker-compose volumes definitions.
It supports to have volumes shared between tasks/containers (when defined at the top level of the compose file), as well as "ephemeral" docker volumes (i.e. volumes: ['/var/mount/to/path']
). If you set driver_opts for EFS, it will pick that up too.
Been using that for many applications now, mostly a ton of kafka, and this works very well. You can also define how much Fargate ephemeral storage you want to assign to the task, up to 200G, as per Fargate definitions in 1.4.0.
Hope this helps,
Hi @JohnPreston
Your response is helpful, currently, I am able to mount the EFS volume but the container keeps failing. This is how I have written my docker-compose.yaml
version: "2"
services:
lawuna_server:
environment:
DB_USER = ["DB_USER"]
DB_PASSWORD = ["DB_PASSWORD"]
DB_HOST = ["DB_HOST"]
DB_PORT = ["DB_PORT"]
DB_NAME = ["DB_NAME"]
image: <docker-image-url>
restart: always
volumes:
- lawuna_server_data:/app
ports:
- "5000:5000"
command: gunicorn -w 3 -b 0.0.0.0:5000 main:app
volumes:
lawuna_server_data:
When I check my logs in ECS the cause of the failure of the task is ResourceInitializationError: failed to invoke EFS utils commands to set up EFS volumes: command failed with 32: failed to execute command to invoke EFS utils: mount.nfs4: Connection reset by peer
I have never seen this syntax for compose before
enviroment:
DB_USER = ["DB_USER"]
DB_PASSWORD = ["DB_PASSWORD"]
DB_HOST = ["DB_HOST"]
DB_PORT = ["DB_PORT"]
DB_NAME = ["DB_NAME"]
Curious to understand how this works :thinking:
On the issue you get, this seems to be the best place to figure it out: https://aws.amazon.com/premiumsupport/knowledge-center/fargate-unable-to-mount-efs/
It that compose example what you used with the ECS Plugin or compose-x ?
I'm assuming the scale warning is safe to ignore? I'm guessing the warning is issued due to docker-compose defaulting to scale of 1, even if you don't specify any?
+1
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Description
When I deploy a docker-compose.yml file to ECS I get a warning about entries that are not present.
Steps to reproduce the issue:
docker-compose.yml
Describe the results you received:
Output of
docker compose version
:Output of
docker info
: