Skip to content

Craft3 CMS Docker base (Nginx, PHP-FPM 7, MySQL, Redis)

License

Notifications You must be signed in to change notification settings

GRANA/craftcms-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This repo contains instrumentation to automate the creation of a GRANA customised CMS development environment.

Pre-requisites

Before you start, please ensure docker-sync and docker are installed in your local env.

Clone repo and run

Clone the git repo CMS to ~/grana-cms path. ~/grana-cms path must not be changed, as docker-sync depends on this path.

$ git clone https://github.com/GRANA/cms.git ~/grana-cms/

To run, clone this git repo and run the following:

$ git clone https://github.com/grana/craftcms-docker.git
$ cd craftcms-docker && sudo docker-sync-stack start

Under the hood, docker-sync-stack up starts a new volume to sync your local git repo into the cms container, and then calls docker-compose up to instrument creation of the cms, redis, mysql containers to host the dev environment. All three dockers runs in the foreground with logs printed on screen. Docker-sync runs in the mode to show every file sync. Keep the tab open, it helps you to debug issues if there was any.

Now, code + environment are setup and running, navigate to http://localhost/admin/install to begin installation.

After the installation, it gives you a fresh setup 🌱. Run craft migrate/up in cms docker to upgrade to get the latest customisations.

Edit CraftCMS files

You can edit the files in your local repo directly, they will be automatically sync'ed into docker container.

Acknowledgements - what this project is reference from.

About

Craft3 CMS Docker base (Nginx, PHP-FPM 7, MySQL, Redis)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 56.3%
  • PHP 29.6%
  • Shell 14.1%