copilot-cli: Can't successfully deploy app with copilot

I have a docker container for a small django project that I’m trying to deploy.

After running

copilot init --app ai-int                \
  --name lb-si                             \
  --type 'Load Balanced Web Service'     \
  --dockerfile './Dockerfile'            \
  --deploy

Everything builds correctly, but the deploy seems to get stuck and doesn’t complete (hangs indefinitely). No targets are registered to the target group and the url for the load balancer returns a 503. Here’s the final output

Login Succeeded
The push refers to repository [374153183614.dkr.ecr.us-east-1.amazonaws.com/ai-int/lb-si]
8397b626743a: Pushed 
0f0b8cefc3de: Pushed 
a4f395fb894d: Pushed 
90df760355a7: Pushed 
574ea6c52bdd: Pushed 
d1573fad78d1: Pushed 
14c1ff636882: Pushed 
48ebd1638acd: Pushed 
31f78d833a92: Pushed 
2ea751c0f96c: Pushed 
7a435d49206f: Pushed 
9674e3075904: Pushed 
831b66a484dc: Pushed 
init-img: digest: sha256:2c5a3c6895e897bb3f73b78421b3b5e6d1ae1e6b268d513b1e229692f7572dc0 size: 3052
⠹ Deploying lb-si:init-img to test. ^C

My Dockerfile

FROM python:3.7.4
ENV PYTHONUNBUFFERED=1
RUN mkdir /code
WORKDIR /code
COPY requirements.txt /code/
RUN pip install -r requirements.txt
EXPOSE 80
COPY . /code/

The cloudformation showing where it ultimately gets stuck: Screen Shot 2020-11-01 at 10 48 42 PM

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

Getting close, but still getting that error. Should I be changing my Dockerfile EXPOSE statement to 8000? As opposed to 80.

Thanks for the quick response @kohidave!

The errors all come to this: “Essential container in task exited – Network bindings - not configured”

Does that mean anything significant to you?

Sorry if this is a clear issue I’m missing, I’m new to the aws ecosystem, hence my choice of using copilot 😃