Just in time for the holidays, I've put together a project which I hope will be a gift for everyone. I've already asked a number of dumb questions here and probably will ask more, so I'm contributing this back to the community... Enjoy! I've licensed social-nginx as open source through an Apache license. Feel free to use it.
I had a number of objectives:
The first goal (NGINX) isn't directly related to the others, but I can say that SE is noticeably faster on NGINX.
The result is social-nginx. Social-nginx is a Docker container that is configured to run SocialEngine on NGINX with PHP-FPM. It knows how to quickly set up a local database for super fast, super easy development and testing- or use an existing database connection in production. By storing my entire SocialEngine site, including the database, in a Github repository it is instantly reproducible from any branch or version. (Note: social-nginx is a public project. My SocialEngine site, however, is a private repository because, of course, SE is a commercial product). Because this is a docker container, it runs in the exact same environment on my laptop that runs on a cloud server or a cluster. No surprises! No environment changes that are only made in one place! No one-off server changes that I don't remember, having to figure them out all over again when I change things later. Docker brings huge benefits to developing and operating a modern web application.
It's still rough around the edges, but I have this working. I can easily and effortlessly create a feature branch, launch my SE site on my laptop, make my changes (including adding plugins or themes), push changes to version control and test the changes in the cloud, then merge the branch into my main branch and redeploy my production server (there is still some work to fully automate everything, but I'm working on that). I can also give contract developers access, let them make changes in isolation, and review and test their changes before merging and deploying using the same workflow.
In the Github repo, I've posted full instructions for testing this out yourself. Let me know what issues you encounter, or if you find this useful.
Check it out!
https://github.com/TheTinkery/social-nginx
Thanks!
Eric
Off to a good start!
We use GitHub to push changes also to production servers also and a few other DevOps tools for our separate clusters. You have made a great contribution here!
Thanks for the post. We do have improvements coming for the development process as mentioned in your other thread.
I'm sure your GitHub will be helpful to others. Thank you for not including SE files in it.
I just noticed the URL rewriting in the NGINX config isn't working - I must have changed something that affected that. I'll fix that!
Not sure whether you want questions here or on the git.
step 14 when you mention copying the template out of /social-engine/site-template , is this to the projects folder created in step 12 ?
is also step 15 and 16 to be extracted to step 12 folder?
Thanks
This is copying to the socialengine folder inside the project folder, creating a skeleton directory that is expected by the other parts of the script.
So using the directory names I had it is the same as
cp -R ~/se-nginx-test/social-nginx/site-template/. ~/se-nginx-test/socialengine/
I was just using relative directories based on the current directory from the previous steps.
I've updated the git repository (and docker image) with a few updates- primarily fixing the NGINX URL rewrite rules that stopped working.
I've taken a narrow approach- most NGINX conf files for SE I've found are flexible about allowing external calling of PHP files. I've taken a different approach- I don't allow external calling of php files except where SE makes those calls. Currently I've only found one case of this- SE pages (or maybe my them) call css.php directly. So I carved out an exception for that.
So if something isn't working, and google dev tools how that you're getting a 404 on some php file, let me know and I can edit the nginx-site.conf to allow it.
New to SE and haven't done my install setup yet. I was wondering if anyone has this working:
I'm looking to install SE to run fully on NGINX. Also, noticed Eric github link is broken or not available. Appreciate any feedback.
Just note that this will not be supported by SE so if you need support, you wouldn't be able to get it from SE as the SEPHP script doesn't work on Nginx without tweaks and is not officially supported. BryZar, our recommended host, has it on Nginx by proxy which is fine.
paulev said:
New to SE and haven't done my install setup yet. I was wondering if anyone has this working:
Instant SocialEngine on NGINX with Modern DevOp
I'm looking to install SE to run fully on NGINX. Also, noticed Eric github link is broken or not available. Appreciate any feedback.
The github link went down mid-late last year. I just had a look through github and found this repo which contains it.
Earlier this year, I used the docker image image available here for some testing. I eventually decided to use OpenLiteSpeed as the back end for my site, although I am going to let it run for six months before deciding whether or not this will be permanent.
If I remember correctly, additional config needs to be added to implement the .htaccess rules that SocialEngine relies on to prevent files that should be accessible to not be accessible.
Due to the way nginx is configured in social-nginx, it is likely it will need updating to function with SocialEngine 5.x due to the way the mobile apps are implemented.
Has this project been discontinued?
It is now a very nice project.
I hope it will continue.
Happy SE