Bootstrap an OctoberCMS local development environment with LANDO and OFFLINE-GmbH/oc-bootstrapper
-
Install the latest release of lando depending on your OS system if it's not already done.
-
Create a directory for you octoberCMS instance, let's name it chkilel
-
CD to this directory:
$ CD chkilel
-
Clone the repo
$ git clone https://github.com/chkilel/oc-lando-setup.git .
-
Modify the APP name in the .lando.yml file, the APP name, must be unique, check the exitance of the APP by running
lando list --all
befor starting the APP, See comments in the file.name: nameOfTheApp # MUST BE MODIFIED BEFOR FIRING UP THE LOCAL DEV ENVIRONMENT
-
Start the APP by running
$ lando start
After the local dev fire up, you will see
BOOMSHAKALAKA!!! Your app has started up correctly. Here are some vitals: NAME chkilel LOCATION /Users/Adil/Sites/october/chkilel SERVICES appserver, database APPSERVER URLS https://localhost:32900 http://localhost:32901 http://chkilel.lndo.site https://chkilel.lndo.site MAILHOG URLS http://localhost:32789 http://mail.chkilel.lndo.site https://mail.chkilel.lndo.site
-
Initialize your project, use the october init command to create a new empty project with a config file:
$ lando october init
-
Change your configuration in your newly created project directory you'll find an october.yaml file. Edit its contents to suite your needs, refere to oc-bootstrapper for more details
app: url: 'http://chkilel.lndo.site' locale: en debug: true cms: theme: oc-bootstrap (https://github.com/prismify/oc-bootstrap-theme.git) edgeUpdates: false enableSafeMode: false # project: XXXX # Marketplace project ID database: connection: mysql host: database # naming convention for LANDO, alaways default host is database username: lamp # the name is the same as the recipe name of the .lando.yml file password: lamp # the name is the same as the recipe name of the .lando.yml file database: lamp # the name is the same as the recipe name of the .lando.yml file plugins: - Vdlp.Redirect - Rainlab.Pages - Rainlab.Blog - Rainlab.User - Rainlab.Builder - Indikator.Backend - Inetis.Dump # - LukeTowers.EssentialVars # - LukeTowers.TwigPCRE # - OFFLINE.SiteSearch - OFFLINE.ResponsiveImages # Install a plugin from the official October Marketplace # - OFFLINE.Mall # Install a plugin from a git repository. The plugin will be cloned # into your local repository and become part of it. You can change the # plugin and modify it to your needs. It won't be checked out again (no updates). # - OFFLINE.Mall (https://github.com/OFFLINE-GmbH/oc-mall-plugin.git) # The ^ marks this plugin as updateable. It will be removed and checked out again # during each call to `october install`. Local changes will be overwritten. # This plugin will stay up to date with the changes of your original plugin repo. # - ^OFFLINE.Mall (https://github.com/OFFLINE-GmbH/oc-mall-plugin.git) # Install a specific branch of a plugin. Keep it up-to-date. # - ^OFFLINE.Mall (https://github.com/OFFLINE-GmbH/oc-mall-plugin.git#develop) # - Vendor.Private ([email protected]) # - Vendor.PrivateCustomBranch ([email protected]#branch) #Run lando info and check host in # external_connection: { # host: 'localhost', # port: '32939' # }, mail: # Change the host according to the information above # Must be checked in every start of the Dev Environment because the "port" change # Or Change it to mail.YOUR_LANDO_APP_NAME.lndo.site like the example below # See proxy.mailhog in the .lando.yml file host: mail.chkilel.lndo.site name: Adil Chehabi address: [email protected] driver: sendmail
-
When you are done editing your configuration file, simply run
october install
to install October. oc-bootstrapper will take care of setting everything up for you. You can run this command locally after checking out a project repository or during deployment. This command is idempotent, it will only install what is missing on subsequent calls.$ lando october install
Use the --help flag to see all available options.
lando october install --help
-
If at any point in time you need to install additional plugins, simply add them to your october.yaml and re-run
october install
. Missing plugins will be installed. -
If you want to update the installation you can run
$ lando october update
-
To push local changes to the current git remote run
$ lando october push
If you are actively developing a site and would like to get the latest and greatest changes for October when updating, then
-
Change the following config files
- config/app.php
'name' => 'October CMS' // Your App/Site name
- config/cms.php
edgeUpdates = true // Enables updating plugins not managed by composer to their edge (develop) versions backendTimezone = 'UTC' // Whatever timezone most of your backend users will find useful as a default disableCoreUpdates = true // Disables updating the core through the backend interface, this should be managed by composer only
-
Run the script below
$ ./setupDev.sh
If needed, make it executable
$ chmod +x setupDev.sh