-
Notifications
You must be signed in to change notification settings - Fork 10
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
Installing via docker compose #5
Comments
@damianmytek I think there are some leftover bugs from our (very recent) migration from Postgres to MySQL. I will look into it asap and get back to you. PS: I also updated our announcement article, have you tried following that? |
Hi @jeroenbourgois thanks for getting back to me. version: "3"
services:
db:
image: mysql
networks:
- webnet
environment:
- MYSQL_PASSWORD=logger
- MYSQL_USER=logger
- MYSQL_DATABASE=mailgun_logger
- MYSQL_RANDOM_ROOT_PASSWORD=yes
volumes:
- db_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 5s
retries: 10
web:
image: jackjoe/mailgun_logger
depends_on:
db:
condition: service_healthy
ports:
- "5050:5050"
networks:
- webnet
environment:
ML_DB_USER: logger
ML_DB_PASSWORD: logger
ML_DB_NAME: mailgun_logger
ML_DB_HOST: db
networks:
webnet:
external: false
volumes:
db_data: {} which is what i found in the announcement article. Now i am getting this error:
I am still learning on how to use docker so chances are that this is something on my end. I also tried deploying your package on a different server(synology with docker) but i am also getting errors. Your project looks very interesting to me and i would love to test it. Thanks, |
@damianmytek ok, let's take this step by step. First, we need to address you docker-compose issue. I noticed that our readme was slightly different than the file we actually used, the 'ML_' env vars should be preceded with a dash. Here is the complete file again: version: "3"
services:
db:
image: mysql
networks:
- webnet
environment:
- MYSQL_PASSWORD=logger
- MYSQL_USER=logger
- MYSQL_DATABASE=mailgun_logger
- MYSQL_RANDOM_ROOT_PASSWORD=yes
volumes:
- db_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 5s
retries: 10
web:
image: jackjoe/mailgun_logger
depends_on:
db:
condition: service_healthy
ports:
- "5050:5050"
networks:
- webnet
environment:
- ML_DB_USER: logger
- ML_DB_PASSWORD: logger
- ML_DB_NAME: mailgun_logger
- ML_DB_HOST: db
networks:
webnet:
external: false
volumes:
db_data: {} Next, can you check the syntax by running If that works we can continue from there. |
I'm also a docker newbie, and I'm having the same problem.
I noticed that the syntax of the web environment was different from that of the db environment, so I tried changing
to
and that fixed the first part of the error. But I'm still getting
I noticed this in the documentation for depends_on...
https://docs.docker.com/compose/compose-file/ I assume this is probably the cause, but I have no idea how to correct it. |
I tried simply removing the condition clause from depends_on and that resolved the error, but I'm now having a variety of other errors. It seems the provided config has issues. |
@bmercernccer I will get back to you asap, I will first get the suggested docker file myself. Can you tell me which version of docker you are using? |
I'm using 19.03.13. I was finally able to get the logger running, but had to make several changes.
I edited /opt/app/releases/0.0.4/runtime.exs. and added longer timeouts. I had no idea which one was correct so I just put all three of them in there. Here's the final runtime.exs...
I then exited the shell and committed the change to a new image I called updated-mailgun_logger. Here's the final docker-compose.yaml file...
Hopefully this helps. |
@bmercernccer thanks so much for your input. I updated the Docker image to have a I tested it on my local machine with the updated version: "3"
services:
db:
image: mysql
networks:
- webnet
environment:
- MYSQL_PASSWORD=logger
- MYSQL_USER=logger
- MYSQL_DATABASE=mailgun_logger
- MYSQL_RANDOM_ROOT_PASSWORD=yes
volumes:
- db_data:/var/lib/mysql
web:
image: jackjoe/mailgun_logger
depends_on:
- db
entrypoint: ["./wait-for", "db:3306", "--", "./start.sh"]
ports:
- "5050:5050"
networks:
- webnet
environment:
- ML_DB_USER=logger
- ML_DB_PASSWORD=logger
- ML_DB_NAME=mailgun_logger
- ML_DB_HOST=db
networks:
webnet:
external: false
volumes:
db_data: {} Main difference is the PS [REDACTED AFTER INPUT FROM @bmercernccer FOR FUTURE REFERENCE]
Be sure to update the docker pull jackjoe/mailgun_logger |
Thanks for the update. I was finally able to get back to this today. At first I had some issues updating the image, but then I realized there's a typo in the instructions. The update command should have an underscore. Once I figured that out I was able to update the image and everything fired up without issue. My logger is now up and running. I'm having some other problems, but they're unrelated to this issue, so I think it can be considered resolved. |
@bmercernccer thank you for bearing with us! I updated the instructions in the readme. Since you posted your issue, we started 'dogfooding' the same public docker image for a client of ours, so most bugs should be polished out now. Happy logging! |
Hi! Thank you very much for this project.
I am trying to install it on my server via docker compose. However I can't get this to work.
Could you point me in the right direction?
here is my log:
Thank you!
EDIT: @damianmytek I just wrapped your log output into the backtick thing, I did not redact anything else.
The text was updated successfully, but these errors were encountered: