-
Notifications
You must be signed in to change notification settings - Fork 471
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
Use custom server name #81
base: master
Are you sure you want to change the base?
Conversation
Nice one here @milanito ! I'm working on an improvement to add more than one symfony apps. I'll be waiting for your PR to be accepted to integrate your changes in my working copy. |
@PyRowMan does this PR works on your environment? |
@maxpou I did not integrated it yet for now My docker project integration is currently in hold because our work machines are lacking some RAM; but it's planned to integrate and test it as soon as i receive the hardware :) |
cool, I'm looking forward then! |
@PyRowMan you're welcome 😄 Tell me if you have any issue, but I think you could make it run on your env. We have been deploying a staging env for our application using this PR code, for the moment we have had no issue, but this is an env we tailored to our needs |
@maxpou I am too, i'm really tired of working with that shitty wampserver uU @milanito I haven't actually even installed the PR for now, but i have seen the commit files and there is no probleme i can foresee. Nonetheless i have a problematic that i can't solve : At first my idea for integrating more than one app into the project was to creating a new docker container for each symfony app. But after trying that solution I had ran into some issues. I then got back to the temporary easy standard "all symfony apps in the same container". So i'm asking it now: what are you thinking is the best solution ? Btw : One of the problems with the second solution is that you can't set the workdir to the symfony app directly... And i'm annoyed with it. |
@PyRowMan I think the first solution is the one I'd use. But in this case, you might have to change several things :
I think with all that it should work. Anyway, I'm not sure it's the right place for this discussion 😄 maybe after this PR is merged, you could open an issue for that ? |
@milanito Yes, you are totally right ! I'll do that as soon as I have the time to write the right issue. About that PR, I tested your branch yesterday, here is my review : Note that I had activated the opcache before merging you PR. I had less performances after merging your branch, something like 0.3 seconds more loading page on a standard symfony page. Do you have any idea where that can come from ? |
@PyRowMan uhm, to be honest no 😄 Could you provide maybe a benchmark comparing both env (before and after the PR) ? I though it'd might be openresty but it's supposed to be even better. |
@milanito Today my environnement don't want to play I think. I was at like 1.5 sec loading time yesterday; today i'm at 17 sec loading time. But when i tested it there was no real difference between the two branches. (0.3 seconds like I said) I'll make a Issue to integrate opcache and test the perfs. |
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 branch work well on my machine, there is two merging conflict but you can accept the one from this branch :)
Hello,
First, let me thank you for this project.
This PR has the same goal than #68 , meaning using a custom env variable for the server name (for the moment is it
symfony.dev
in the config file)Description
Nginx is not supposed to read for env variables, to do so, you need the Lua support through the dedicated module. The recommanded way to use it is to use openresty, which I did in the nginx image
Usage
A new env variable has been added to the
.env.dist
file,SERVER_NAME
. You should update this variable to change your server nameChanges
The nginx service now uses openresty.
Because Openresty does not come with default file, I had to :
fastcgi_params
andmime.types
files to the projectThe env variables is retrieved using the
set_by_lua_block
directive, using this simple block :Related Issue
Fix #58
Misc
This PR has been tested with this demo app, which is in 3.1, and an internal application (not from auth0), which is in 3.3 .
The applications have been tested both on Mac OS X and Ubuntu.
Thank you for reading 😄