Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue while trying to run the following command phantom-dc docker #97

Open
mabuaisha opened this issue Oct 18, 2016 · 9 comments
Open
Labels

Comments

@mabuaisha
Copy link

mabuaisha commented Oct 18, 2016

I'm getting an error while trying to run the following command docker

  docker run -it --rm --name=phantom-dc \
      --link=phantom-dc-db:db \
      -p 3001:3001 \
      --volumes-from=phantom-dc-db \
      -e CORS_ALLOWED_DOMAINS='http://example.com' \
      -e LOAD_CONGRESS=true \
      -e DEBUG_KEY=changeme \
      electronicfrontierfoundation/phantom-of-the-capitol
<Mysql2::Error: Access denied for user 'phantom_dc'@'172.17.0.3' (using password: YES)>
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "reconnect"=>true, "database"=>"phantom_dc_production", "pool"=>100, "username"=>"phantom_dc", "password"=>"changeme", "host"=>"172.17.0.2"}, charset: utf8, collation: utf8_unicode_ci
fatal: Not a git repository (or any of the parent directories): .git

I followed the instructions you mentioned but without luck , any help in that ???

@mabuaisha
Copy link
Author

@Hainish could you check my comment above and try to help ?

@PollyP
Copy link
Contributor

PollyP commented Jan 22, 2017

I'm having the same problem. Here is what I have tried to debug it:

  • tried attaching to the database in the first docker instance using the user "phantom_dc" and the MYSQL_APP_PASSWORD from my host. Nope.
  • tried attaching to the database in the first docker instance using the user "root" and the MYSQL_ROOT_PASSWORD from my host. Yes.
  • did an exec of bash into the first docker instance and tried attaching as user "phantom_dc" locally, using the MYSQL_APP_PASSWORD. Nope.
  • Tried attaching as root locallying, using MYSQL_ROOT_PASSWORD. Yes.
  • Selected USERS out of mysql.users, got two root users (!!), mysql.sys, and NO phantom_dc user.

My mysql-fu is pretty rusty and I am out of ideas. Can anyone get me pointed in the right direction? My goal is to spin up a local instance to use for testing for an application I'm developing.

Thanks in advance for your help.

@j-ro
Copy link
Collaborator

j-ro commented Jan 22, 2017

While we've never tried the docker way, we did have success the vagrant way, so could try that.

@PollyP
Copy link
Contributor

PollyP commented Jan 22, 2017

@j-ro: The vagrant instructions worked like a charm for me. You are awesome.

@PollyP
Copy link
Contributor

PollyP commented Jan 22, 2017

A quick followup question: I've installed via vagrant and populated the database and verified it with a curl command against http://localhost:9292/retrieve-form-elements. But what's the best practice for testing against /fill-out-form without touching the actual congressional contact forms?

@j-ro
Copy link
Collaborator

j-ro commented Jan 22, 2017

As far as I know there, is none -- I'm not sure what exactly you'd be testing without going and filling forms. So go ahead and fill them, we do tests like this all the time.

@Hainish
Copy link
Member

Hainish commented Jan 23, 2017

cc @wioux

@wioux
Copy link
Member

wioux commented Jan 23, 2017

@PollyP that sounds useful and I've proposed a feature on #99.

@mabuaisha
Copy link
Author

@Hainish @wioux The vagrant instructions worked 100% for me but the issue is when I tried to use the docker and based on the instructions it seems it doe not work at all , I think docker will be much easier to run and deploy for production use than vagrant , all we need to do is just ti run the docker image and it will work like a charm.

I think if you make the docker work that will be helpful

@wioux wioux added the bug label Jan 24, 2017
@wioux wioux mentioned this issue Feb 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants