Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Dockerizing Rate Topic   - - - - -

 
  • natewallis
  • Senior Member
  • Members
  • Join Date: 11-Jan 13
  • 227 posts

Posted 29 October 2020 - 05:52 AM #1

Hi, 

 

Just curious if anyone has experience with dockerizing CS-CART and any snags you may have it. 

 

I am trying to solidify my development and deployment of our CS-CART install. 

 

A few questions:

 

- How to handle upgrades

- Would it be possible to use a docker volume (maybe connect to s3) for folders like ./images folder?

- How could I deploy a staging build to a different server compared to a production build

 

I'd be interested to hear any of your experience dealing with Docker and CS-CARt... 



 
  • harmsmitsdev
  • Advanced Member
  • Members
  • Join Date: 22-Feb 20
  • 60 posts

Posted 29 October 2020 - 08:18 AM #2

Hi, 

 

Just curious if anyone has experience with dockerizing CS-CART and any snags you may have it. 

 

I am trying to solidify my development and deployment of our CS-CART install. 

 

A few questions:

 

- How to handle upgrades

- Would it be possible to use a docker volume (maybe connect to s3) for folders like ./images folder?

- How could I deploy a staging build to a different server compared to a production build

 

I'd be interested to hear any of your experience dealing with Docker and CS-CARt... 

Hello,

 

We handle upgrades by first doing a local one, committing all the changes, and then executing all the upgrade migrations that are provided with an upgrade. We have also used CS-Carts internal github repository but that does mean you have to ask permission first.

 

Yes, you could use a docker volume for files, but its not recommended to use S3 then. Instead, you should probably use something like EFS, as its was made to work that way. S3 is meant to be used through an API.

 

You could make a staging server by using something like Elastic Beanstalk.

 

Kind regards,



 
  • natewallis
  • Senior Member
  • Members
  • Join Date: 11-Jan 13
  • 227 posts

Posted 30 October 2020 - 12:29 AM #3

Hello,

 

We handle upgrades by first doing a local one, committing all the changes, and then executing all the upgrade migrations that are provided with an upgrade. We have also used CS-Carts internal github repository but that does mean you have to ask permission first.

 

Yes, you could use a docker volume for files, but its not recommended to use S3 then. Instead, you should probably use something like EFS, as its was made to work that way. S3 is meant to be used through an API.

 

You could make a staging server by using something like Elastic Beanstalk.

 

Kind regards,

 

Great, thanks. 

 

That makes sense.   So you run the command line migrations on production prior to pulling in code changes?  I didn't realise you could run the database migrations separate to the code updates. 

 

The reason I wanted to use S3 was that we have custom addons, one of which is for our product brochures.  All brochures have 1 page, but in special circumstances, some products have a second page with more detailed product specs on them.  If a file is found in a particular folder that matches the product SKU, then this second page is appended to the PDF.  The reason I wanted to use volumes was so that management could FTP directly into the folder and drop the second page PDF files as they were generated...   But I gather the same would work for EFS.... 

 

How about deployment, do you use ECS for your containers?

 

I am trying to think of the simplest deploy method to aws.   Traffic to our site is about 20K users per month with session times of about 4 minutes which is pretty modest.   I keep thinking of dockerizing and using ECS, but maybe that is overkill. 

 

Currently i run mysql on the same instance as the website.  Although I think it makes sense to possibly push the database to its own VPC..  

 

I would be interested in your thoughts.... thanks again



 
  • ThomH
  • Senior Member
  • Members
  • Join Date: 20-Nov 07
  • 1600 posts

Posted 30 October 2020 - 11:23 AM #4

There is a solution on github


WebGraphiq offers a wide range of professionally developed, ready to use CS-Cart add-ons to provide additional functionality and boost your sales. The oldest active CS-Cart add-on development team. -- Since 2006 --


CS-CART ADD-ONS | FREE QUOTE | CS-CART DEVELOPMENT | @webgraphiq


 
  • natewallis
  • Senior Member
  • Members
  • Join Date: 11-Jan 13
  • 227 posts

Posted 04 November 2020 - 03:25 AM #5

Thanks... I'll check it out. 



 
  • harmsmitsdev
  • Advanced Member
  • Members
  • Join Date: 22-Feb 20
  • 60 posts

Posted 04 November 2020 - 08:57 AM #6

There is a solution on github

Well, if you do use that, make sure to at least change the PHP settings. 100M upload limits for production is just a big no.



 
  • harmsmitsdev
  • Advanced Member
  • Members
  • Join Date: 22-Feb 20
  • 60 posts

Posted 04 November 2020 - 09:00 AM #7

Great, thanks. 

 

That makes sense.   So you run the command line migrations on production prior to pulling in code changes?  I didn't realise you could run the database migrations separate to the code updates. 

 

The reason I wanted to use S3 was that we have custom addons, one of which is for our product brochures.  All brochures have 1 page, but in special circumstances, some products have a second page with more detailed product specs on them.  If a file is found in a particular folder that matches the product SKU, then this second page is appended to the PDF.  The reason I wanted to use volumes was so that management could FTP directly into the folder and drop the second page PDF files as they were generated...   But I gather the same would work for EFS.... 

 

How about deployment, do you use ECS for your containers?

 

I am trying to think of the simplest deploy method to aws.   Traffic to our site is about 20K users per month with session times of about 4 minutes which is pretty modest.   I keep thinking of dockerizing and using ECS, but maybe that is overkill. 

 

Currently i run mysql on the same instance as the website.  Although I think it makes sense to possibly push the database to its own VPC..  

 

I would be interested in your thoughts.... thanks again

For deployment we use EKS and ECS. It depends on the needs one customer might have. Kubernetes works amazing for websites that only need 3 or 4 application servers, whilst something like ecs is generally more robust and is used along with amazon rds & elasticache to build a store able to withstand the traffic of a few thousand sessions at once.

 

Besides that, kubernetes also works way better for cross-cloud. As you can easily take your business to azure / google cloud within a few hours. Which is something that a lot of customers also prefer.

 

Regarding the simplets method to deploy to aws. Just create an aurora database (serverless), with elasticache, and install cscart on a single server. If time comes for autoscaling, its not even that hard to set up at that point. As you will just need to create a docker container for your application and register it accordingly.