hackoregon / transportation-backend

Transportation backend repo - 2016 and 2017
8 stars 7 forks source link

Issues preventing Docker from deploying successfully #31

Closed MikeTheCanuck closed 7 years ago

MikeTheCanuck commented 7 years ago

I'm working with Tony to get the API container stabilized enough for it to deploy to AWS and be able to serve traffic to external requests. There's a couple of issues I've noticed in the arrangement of files that are making it hard to finalize this work:

  1. The /bin directory is needed inside the container - or at least, the /bin/docker-entrypoint.sh script - but the docker-compose.yml files specify ./transDjango:/code rather than .:/code for the volume parameter. This parameter value means that only the contents of /transDjango folder are available inside the container, which explains why Docker reports that it can't find the /code/bin/docker-entrypoint.sh file at start of the container. This issue is definitely preventing the container from successfully launching when it's pushed to AWS.
  2. There are two requirements.txt files - one in /apidocker folder, and another in /transDjango/APIimports folder. When trying to figure out which files are being included in the container image build, it's an extra challenge when I see a requirements.txt file that might be necessary but which (unless I'm crazy) isn't being pulled into the container. Can someone help me understand why there are two requirements files, and/or which one is intended to be used for what?
MikeTheCanuck commented 7 years ago

Other possible items to investigate (see if they're configured correctly or not):

  1. ALLOWED_HOSTS - does it successfully allow requests from the load balancer?
  2. Does the Docker container - when running in AWS - have access to the database?
  3. Remove the duplicate docker-entrypoint.sh I temporarily put in /transDjango/bin/ to get the container to start in AWS.
sanjuroj commented 7 years ago

I don't see two requirements files, which branch are you working on? If travisTest, have you pulled master recently? There were two requirements files for a long while but I thought I got rid of one of them.

sanjuroj commented 7 years ago

I take it back, there was another requirements file, in the APIimports directory, which was kind of a strange place for it. I just pushed an update that deletes it.