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

Database connection error on Docker startup for new dev install #1244

Open
SandyS1 opened this issue Feb 13, 2020 · 9 comments
Open

Database connection error on Docker startup for new dev install #1244

SandyS1 opened this issue Feb 13, 2020 · 9 comments
Assignees

Comments

@SandyS1
Copy link
Contributor

SandyS1 commented Feb 13, 2020

Steps required to reproduce the problem

  1. Check out latest from master
  2. Copy docker-compose.yml.dist to docker-compose.yml
  3. Change line 10 to - "CFP_ENV=development"
  4. Change DB password on config/development.yml.dist and config/production.yml.dist to root
  5. Issue docker-compose up -d
  6. Issue docker-compose -f docker-compose.yml exec app composer run setup-env

Expected Result

  • Install dependencies via composer and load initial database

Actual Result

  • Get
    `In AbstractMySQLDriver.php line 93:

    An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused

In PDOConnection.php line 31:

SQLSTATE[HY000] [2002] Connection refused

In PDOConnection.php line 27:

SQLSTATE[HY000] [2002] Connection refused`

I'm doing this on a new Mac with MacOS Catalina 10.15.3 with Docker version 19.03.5, build 633a0ea and docker-compose version 1.25.4, build 8d51620a

@chartjes
Copy link
Contributor

chartjes commented Feb 13, 2020 via email

@chartjes
Copy link
Contributor

I followed the instructions in the README file and was able to:

  • successfully build the docker container
  • successfully execute the 'docker-compose' command as instructed

I now have a working version of the application in a docker container.

@chartjes
Copy link
Contributor

Never mind, I spoke too soon. I am seeing the same error. Will dig in and fix

@chartjes chartjes self-assigned this Feb 28, 2020
@toofff
Copy link

toofff commented Sep 24, 2020

@chartjes Why did you delete the docker-compose.yml.dist file from the project in this commit knowing that the documentation still refers to it?

ping @BoutValentin

@chartjes
Copy link
Contributor

Sorry about that, it was part of a cleanup I did not finish. I have re-added that file

@toofff
Copy link

toofff commented Sep 24, 2020

Thanks!

@toofff
Copy link

toofff commented Sep 25, 2020

@chartjes Would it be interesting for you to redo the docker for your project?
Because I am seeing some design errors on the use of docker and docker-compose in your project.

@chartjes chartjes reopened this Sep 25, 2020
@chartjes
Copy link
Contributor

@toofff I would definitely take a look at any changes like that. The docker stuff was a 3rd party contribution so I didn't delve into it too deeply

@toofff
Copy link

toofff commented Sep 25, 2020

@chartjes Thank you to you and I understand it perfectly and I also prefer that you look in detail ;)
We will be working on this task in the coming weeks with @BoutValentin.
We will open a Pull Request probably the first half of October.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants