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

Failed to connect database #5

Open
Akibalogh opened this issue Apr 16, 2020 · 1 comment
Open

Failed to connect database #5

Akibalogh opened this issue Apr 16, 2020 · 1 comment

Comments

@Akibalogh
Copy link

Akibalogh commented Apr 16, 2020

Me again.. any advice for why I can't find the database this time?

aki-macbook-pro:meetrics akibalogh$ docker run --rm -e DB_HOST="host.docker.internal" -v `pwd`:/app chasdevs/meetrics | tee out.log
time="2020-04-16T21:47:17Z" level=info msg="Environment: development\n"
panic: failed to connect database

goroutine 1 [running]:
github.com/chasdevs/meetrics/pkg/data.Init()
	/app/pkg/data/data.go:35 +0x18c
main.init.0()
	/app/main.go:27 +0x2e

I can run docker-compose up -d mysql but not the go program

@Akibalogh
Copy link
Author

I don't have anything else running

REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
<none>               <none>              757618972b54        8 minutes ago       1.02GB
akibalogh/meetrics   latest              98d54ae3e0a7        32 minutes ago      19.6MB
chasdevs/meetrics    latest              98d54ae3e0a7        32 minutes ago      19.6MB
<none>               <none>              e2debd5d200f        32 minutes ago      1.02GB
mysql                latest              0f39f4b4d96c        12 hours ago        547MB
golang               latest              315fc470b445        7 days ago          809MB
alpine               latest              a187dde48cd2        3 weeks ago         5.6MB
aki-macbook-pro:meetrics akibalogh$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES```

@Akibalogh Akibalogh changed the title Failed to connect databaase Failed to connect database Apr 16, 2020
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

1 participant