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

Laravel 4.2 sample app with both apache and nginx/fpm docker files #48

Merged
merged 9 commits into from
Feb 8, 2019

Conversation

labbati
Copy link
Member

@labbati labbati commented Nov 22, 2018

The very first commit is the Laravel application as created by the composer command in the getting started guide of the framework.

The real changes are here: dd05647...949eea7

Copy link

@pawelchcki pawelchcki left a comment

Choose a reason for hiding this comment

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

Looks good

one question, would it be worthwile to change the docker images to something more official than FROM alfa30/laravel:4.2
?

I’m worried that those could in theory disappear or get overwritten by something worse

@labbati
Copy link
Member Author

labbati commented Nov 22, 2018

This is a very good idea. The others required a little bit more work, so I took the shortcut 😄 but I want to do it because it makes a lot of sense.
Thanks!

@labbati
Copy link
Member Author

labbati commented Dec 19, 2018

@pawelchcki I based the images on php:5.6-php and performed some refactoring. So basically what's in php/Laravel42 folder is pretty much the app, while everything in php it may be worth a more in depth code review. Note that the file php/apache2.conf is almost a copy and paste of the one in the image, with the exception of the DocumentRoot param.

It would be great to have the final round of CR and merge it!
Thanks

Copy link
Contributor

@SammyK SammyK left a comment

Choose a reason for hiding this comment

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

Awesome job @labbati! I have a few questions/tweaks, but everything else is looking good! :)


Start up an agent: you have to set the env `DATADOG_API_KEY` with your own DD api key.

$ docker-composer up -d agent
Copy link
Contributor

Choose a reason for hiding this comment

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

I make this type-o so often that I tweeted about it. 😆

Copy link
Member Author

Choose a reason for hiding this comment

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

😄

$ docker-compose build laravel42_php56_apache

# Php 5.6 - Nginx/fpm - Laravel 4.2
$ docker-compose build laravel42_php56_nginx
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see the nginx config in the docker-compose.yml file. Should we remove the references to nginx? :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, to be removed, was there before. Good catch

php/README.md Show resolved Hide resolved
*/

Route::get('/', ['uses' => 'HomeController@showWelcome', 'as' => 'simple_route_name']);
Route::get('/distributed-tracing', 'HomeController@distributedTracing');
Copy link
Contributor

Choose a reason for hiding this comment

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

I get an Apache-404 page when I try to visit this URL. I'm wondering if we're missing the Apache config for mod_rewrite? We should probably mention this route in the README, or was this just a left over test? :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Probably I left mod_rewrite config out when moving from the preconfigured image to the one based on php base images. Thanks for noticing. Looking at it

Add a docs line to hint the user at how the app can now been accessed

Co-Authored-By: labbati <luca.abbati@datadoghq.com>
@labbati labbati merged commit 3204ce2 into master Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants