Page 1 of 1

docker-compose.yml and Dockerfiles for local OpenCart Development

Posted: Thu Oct 21, 2021 2:18 am
by compmuseme
https://github.com/dabbmedia/docker-compose-opencart

I set up this docker-compose file to create a stack for local OpenCart development, since Docker is lighter weight than Vagrant and/or VirtualBox instances.

The current version uses Nginx. Most of the code for Apache is commented out, but should work with minor adjustments.

Why?
-work on Twig template or code files without uploading after every change
-build the site locally before uploading/publishing/going-live
-test an extension on a clean install of OpenCart
-several other reasons that currently escape me

I hope it's useful to someone else.

Re: docker-compose.yml and Dockerfiles for local OpenCart Development

Posted: Mon Oct 25, 2021 10:03 pm
by rjcalifornia
compmuseme wrote:
Thu Oct 21, 2021 2:18 am
https://github.com/dabbmedia/docker-compose-opencart

I set up this docker-compose file to create a stack for local OpenCart development, since Docker is lighter weight than Vagrant and/or VirtualBox instances.

The current version uses Nginx. Most of the code for Apache is commented out, but should work with minor adjustments.

Why?
-work on Twig template or code files without uploading after every change
-build the site locally before uploading/publishing/going-live
-test an extension on a clean install of OpenCart
-several other reasons that currently escape me

I hope it's useful to someone else.
Nice!

I've been using Vagrant for some time, which it easier to set up for beginners. I do prefer Nginx for docker, because if you use Apache you might have to change the settings to allow CORS.

About uploading/updating, I resolved that using Visual Studio Code connected directly to the Vagrant folder.