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

Is DB_HOST=localhost correct? #101

Closed
s-ohnishi opened this issue Dec 13, 2022 · 1 comment
Closed

Is DB_HOST=localhost correct? #101

s-ohnishi opened this issue Dec 13, 2022 · 1 comment
Assignees

Comments

@s-ohnishi
Copy link
Contributor

s-ohnishi commented Dec 13, 2022

I'm having trouble running migrations.
(I'm trying with the latest v2.0.0)

when I run

vendor/bin/phalcon-migrations list --config=migrations.php

becomes this.

Fatal Error: SQLSTATE[HY000] [2002] No such file or directory

The file .env.example says DB_HOST=localhost and docker-compose.yml looks like this.

 mysql:
   container_name: invo-mysql
   hostname: invo-mysql

Thinking that this is an error that occurs because the host name is different like this, I rewrote .env to DB_HOST=invo-mysql and executed

Phalcon Migrations

┌──────────────────┬───────────────┐
│ Version          │ Was applied   │
├──────────────────┼───────────────┤
│ 1.0.0            │ N             │
└──────────────────┴───────────────┘

It will be displayed.

Again, I think DB_HOST=localhost in .env is incorrect.
Does it have to be localhost for automatic execution of .github/workflows/main.yml?

@niden niden self-assigned this Dec 14, 2022
@niden
Copy link
Sponsor Member

niden commented Dec 14, 2022

I added a clarification in the .env.example file.

Thank you @s-ohnishi

59acba7

@niden niden closed this as completed Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants