Skip to content

added docker and docker-compose#63

Open
kmjayadeep wants to merge 3 commits into
ankitjain28may:masterfrom
kmjayadeep:dockerize
Open

added docker and docker-compose#63
kmjayadeep wants to merge 3 commits into
ankitjain28may:masterfrom
kmjayadeep:dockerize

Conversation

@kmjayadeep

Copy link
Copy Markdown

Closes #26

Application can be run in docker by using the command

docker-compose up

Signed-off-by: kmjayadeep@gmail.com kmjayadeep@gmail.com

Signed-off-by: kmjayadeep@gmail.com <kmjayadeep@gmail.com>
@ankitjain28may

Copy link
Copy Markdown
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.

Comment thread docker-compose.yml Outdated
image: mysql/mysql-server
command: --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_ROOT_PASSWORD=root_pass

Copy link
Copy Markdown
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
Copy Markdown
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

Copy link
Copy Markdown

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?

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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?

Signed-off-by: kmjayadeep@gmail.com <kmjayadeep@gmail.com>
@ankitjain28may

Copy link
Copy Markdown
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
Copy Markdown
Author

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

@ankitjain28may

Copy link
Copy Markdown
Owner

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

Signed-off-by: Jayadeep KM <kmjayadeep@gmail.com>
@kmjayadeep

Copy link
Copy Markdown
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