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

added docker and docker-compose #63

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kmjayadeep
Copy link

Closes #26

Application can be run in docker by using the command

docker-compose up

Signed-off-by: [email protected] [email protected]

@ankitjain28may
Copy link
Owner

@kmjayadeep Have you tried running the project with the attached docker-compose? Looks like you haven't gone through the project and added the docker-compose file.

image: mysql/mysql-server
command: --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_ROOT_PASSWORD=root_pass
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the use of .env file if we are exposing them in docker-compose itself.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will move them to the .env.docker file then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I see it .env files are great for situations where controlling the real environment variables is awkward, in the case of using docker-compose, or deploying to Kubernetes, using environment variables is usually the better and easier approach.
While env fils are well suited to local development.
What do you think @ankitjain28may?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just read the documentation of env_file in docker-compose, and wow, I did not realise it supported .env files directly :-) that is going to make things nicer sometimes!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it supports .env

@kmjayadeep
Copy link
Author

@kmjayadeep Have you tried running the project with the attached docker-compose? Looks like you haven't gone through the project and added the docker-compose file.

Yes I have. Application is running fine inside docker. Actually, it didn't work properly outside docker as I have some issues with php installation. May I know what the problem is?

@ankitjain28may
Copy link
Owner

@kmjayadeep There is one more service that runs along with db and php server and that service is responsible for sending/receiving messages, Please add that service in the docker-compose and try to check whether it is working or not. The main idea of using supervisor is because of running both the services together

@kmjayadeep
Copy link
Author

Totally missed that! I will check again.
Sorry I'm no expert in php

@ankitjain28may
Copy link
Owner

@kmjayadeep No problem, if you need any help, ping me :)

Signed-off-by: Jayadeep KM <[email protected]>
@kmjayadeep
Copy link
Author

@ankitjain28may Added socket service. Please give a try.

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

Successfully merging this pull request may close these issues.

Dockerize
3 participants