This message was deleted.
# general
b
This message was deleted.
l
Are you using this Docker compose file? https://github.com/infracost/cloud-pricing-api/blob/master/docker-compose.yml Do you know what the permissions on the mounted volume are?
b
That is the version I am on and I shouldn't have permission issues with the volumes.
l
If you run:
Copy code
docker-compose run --entrypoint=/bin/bash init_job
And then:
Copy code
ls -lah data
What do you see?
w
@broad-rain-72019 what AMI did you use to launch the EC2 instance? I’m launching an instance to try and reproduce the issue
b
Thank you so much! I launched Amazon Linux AMI: ami-04902260ca3d33422
I was wondering if launching on Amazon Linux vs. Ubuntu would cause issues. That was my next course of action for testing.
Could the fact that Amazon Linux is based on Red Hat Enterprise Linux (RHEL) cause problems?
w
I just noticed something odd, we fixed one permission issue but we seemed to have forgotten to cut a release tag after that was merged. Looking into it now…
🙌 1
b
Thank you!
w
@broad-rain-72019 in your docker-compose.yml, can you change both instances of
infracost/cloud-pricing-api:latest
to
infracost/cloud-pricing-api:test
and see if that works ok? that’s a test tag I created after the last permissions fix, if that fixes your issue you can use this until we cut a release tag next week (we need to do more testing as upgraded node too in the master branch)
b
I got the same error. 😢
w
Just checking if you tried
docker-compose down
first (to force it to remove the old volumes but maybe that is also needed if they had bad permission issues), then
docker-compose pull && docker-compose up
?
b
I did the commands listed and got the same error again. Thank you so much for your help!
w
sorry to hear that, I’m working on reproducing the issue to dig deeper
b
Thank you! I am trying to deploy to an ubuntu ami now.
👍 1
w
I’ve reproduced the issue 🙂
@broad-rain-72019 can you try this workaround please? (this worked for me) 1.
git pull && git reset --hard
# to revert any changes. 2. edit the Dockerfile to comment-out these lines:
Copy code
#RUN addgroup -g 1001 -S infracost && \
#  adduser -u 1001 -S infracost -G infracost && \
#  chown -R infracost:infracost /usr/src/app
#USER 1001
3.
docker-compose build
4.
docker-compose up
We had added the above to enable non-root containers to run on K8s envs but it doesn’t work on the docker-compose as you’re finding out so we need to test it more
b
That got me further! It now exited init_job_1 and exited with code 0 and is hanging. Is that expected?
w
The init container will take a few minutes and exit after the Docker compose logs show
init_job_1: Completed: downloading DB data
. Is that what you’re seeing?
b
This is what I am seeing
w
hmm in a separate shell if you run
docker ps
do you see the PostgreSQL DB and Cloud Pricing API containers as running?
b
It says up 12 minutes (healthy)!
w
great! since you’re running
docker-compose up
you should see the app logs on the screen if you
curl <http://localhost:4000>
b
Got it!! Thank you so much!!
w
I think if you run
docker-compose up -d
then it goes into daemon mode and exits, so the containers continue to run in the background and you can
docker logs
them individually to see the logs
b
Perfect! Thank you! I really appreciate your help!
w
Anytime 🙂 sorry about the non-ideal deploy experience, we’ll keep testing and release a proper fix next week