Welcome Guest, Not a member yet? Register   Sign In
Codeigniter on PHP paas
#1
Star 

Hello guys, i was wondering if anyone has used Codeigniter for projects hosted on a Platform as a Service provider, like fortrabbit or platform.sh ?

I am planning to use fortrabbit and there are a few things to consider.

1) The load balancers might serve the application from different servers during the same user session, so sessions need to be persisted using memcached or the database instead of files. I will use memcached since it performs better and fortrabbit provides it out of the box.

2) The filesystem cannot be used to store runtime data, like user uploads or logs, since during each deployment the whole local storage gets whipped and replaced. They call this ephemeral storage. To prevent these kind of files from being removed they provide an Object Storage Component which has an additional cost and requires using their own API. My application does not require user uploads but i do want to keep CI logs.

3) These providers do not include email hosting, so i will need to use another company for that. Any suggestions for email hosting?

That's it basically, i would love to hear some suggestions or advice regarding these three points.

If you have experience with any other php cloud hosting provider, please leave a comment too.

Thanks in advance!
Reply
#2

2- Don't if this is practical but could you write the log to a database? Curious - how do you deal with website images? Or does this only apply to uploads?

3- Email hosting: https://www.namecheap.com/hosting/email.aspx
If you are sending transactional emails highly recommend also using this service: https://postmarkapp.com
Its such an awesome service and very cheap for what you get. There are libraries for postmark with codeigniter on github,
Reply
#3

Quote:2- Don't if this is practical but could you write the log to a database?

I might have to log to a database, but since this is a multi tenant application in which each tenant has it's own database and the database is selected globally depending on the subdomain, logs will be saved on each tenant's db. I think it will be better to have them in a single place. Do you know of any library to achieve this?

Quote:Curious - how do you deal with website images? Or does this only apply to uploads?
This only applies to runtime generated files, since these files are not included in my version control system they are dropped when i "git push" to deploy.

Quote:3- Email hosting: https://www.namecheap.com/hosting/email.aspx
If you are sending transactional emails highly recommend also using this service: https://postmarkapp.com
Its such an awesome service and very cheap for what you get. There are libraries for postmark with codeigniter on github.

Thank you for the seggestions! Will take a look
Reply
#4

I have used Cloudways PaaS for managed hosting of my CodeIgniter based website. They are really good, as in I can deploy my app on server in just few minutes. Their stack is also really great for performance improvements since it includes Apache, Nginx, Memcached, Varnish, PHP-FPM. I can also enable CDN, free SSL, and HTTP/2 on my website in just one click.

Now for you questions:

1. There is no load balancing on Cloudways yet, but there is vertical scaling and if you have hosted on KYUP using their platform then there is Auto Scaling as well.

3. They don't have their own email hosting, but you can buy an addon for that.

Not too sure about the second question.
Reply
#5

A quick search turned up a couple of options for integrating CI with Monolog, which would likely give you enough flexibility for the log output to find something which works in your environment. The first one I actually looked at in any detail replaced the Log.php file in the system/core directory, but I would recommend renaming the file (and class) to MY_Log and putting it in the application/core directory, instead, for easier long-term maintenance (so you don't accidentally overwrite it when upgrading CI).
Reply




Theme © iAndrew 2016 - Forum software by © MyBB