-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
Add Docker & Docker Compose and Update README #117
Conversation
Signed-off-by: Ilham Syahid S <ilhamsyahids@gmail.com>
Signed-off-by: Ilham Syahid S <ilhamsyahids@gmail.com>
Signed-off-by: Ilham Syahid S <ilhamsyahids@gmail.com>
Signed-off-by: Ilham Syahid S <ilhamsyahids@gmail.com>
Signed-off-by: Ilham Syahid S <ilhamsyahids@gmail.com>
Signed-off-by: Ilham Syahid S <ilhamsyahids@gmail.com>
Hi @nafiesl, Can you please review this PR? thanks |
I was wondering do you have any plan to use travel-ci again in the future @nafiesl ? Since I saw in image build status here is not load properly |
Hello @ilhamsyahids thanks for the PR, it's been 2 weeks, and I still did not have time to check on this. Sorry. Regarding your question, no, we can change the CI service from Travis to Github action. You can add it to your PR if you have spare time. By the way, we have a community group chat in telegram: https://t.me/silsilah_id you are very welcome if you join there. Thanks @ilhamsyahids. |
I think its better to create another PR for updating the CI pipeline, since this PR is regarding the Dockerfile, @nafiesl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ilhamsyahids, the PR is working as expected. But I have some comments, would you mind to check when you have time?
Thanks.
serve: | ||
php artisan serve --host 0.0.0.0 --port 8000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this part is necessary? Because:
- This part is using php internal server, but we are using nginx here (related to the
nginx.conf
file included in this PR) - I tried to remove these 2 lines and tried to run the
make run-docker
, the web is still work. - When I keep these 2 lines and try to run
make serve
, yes it works (as we run the artisan serve), but why do we need it when we use docker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not related to the Docker, its actually related when we want to run without docker here to simplify the command, I'll make changes to include that on the README.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ilhamsyahids ok got it, let's keep it as is. Thanks.
RUN composer dumpautoload --optimize | ||
|
||
# Copy .env file | ||
COPY .env.example .env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am getting this warning when I tried to run docker-compose up --build -d
$ docker-compose up --build
WARN[0000] The "PUSHER_APP_CLUSTER" variable is not set. Defaulting to a blank string.
WARN[0000] The "PUSHER_APP_CLUSTER" variable is not set. Defaulting to a blank string.
WARN[0000] The "PUSHER_APP_CLUSTER" variable is not set. Defaulting to a blank string.
Do you have any idea why this is happening?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats because we dont set on this env or in the local system environment.
Since we are not using it on this PR, I suggest to remove it.
Also I also thinking to remove all unnecessary env config on the .env.example
and keep the required one. The reasons are to make the app clean and we dont need to think to add it when we want to deploy it
What do you think? @nafiesl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ilhamsyahids, OK thanks for the explanation, I found that the warning message is showing because my .env
file in my localhost contains those 2 variables (which are not being used anywhere).
After I removed those 2 lines for my .env variable, the warning was gone.
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
So I think this is not an issue anymore, I will approve and merge this PR. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR, thanks @ilhamsyahids
Summary
Run by
Add php image with web server nginx
Add with mysql image
Add Makefile to simplify and shorten script
readme.md
andreadme.id.md
to README.md and README.id.md respectively, I think its better to use convention name just like other OS project.