Skip to content

Planet 4 new development environment

Notifications You must be signed in to change notification settings

greenpeace/planet4-develop

Repository files navigation

Planet 4 development environment

Last release Last pipeline result on main branch

Get a full Planet 4 development environment to your local machine
We are using wp-env as a base and pulling all necessary themes and plugins so that you can develop for your website more easily.

System Requirements

Before anything

  • Clone this repo
  • Set node version
> nvm use

Installation

> npm run env:install

Clean up

> npm run env:clean

All commands

npm run
- env:install                       Install default Planet 4 theme and database
- env:clean                         Clean wp-env and delete all Planet 4 files
- env:config                        Show generated configuration
- env:fix-permissions [all]         Fix files permissions to current user as owner
- env:clean-repos                   Remove main repos if they are not git repositories
- env:update                        Update installer, base and main repos
- env:status                        Status of docker containers
- nro:install <?nro>                Install NRO theme and database, if declared in .p4-env.json
- nro:enable                        Enable installed NRO theme and database
- nro:disable                       Switch back to default theme and database
- nro:theme <?nro>                  Clone NRO theme in themes dir
- build:assets                      Build main repos assets
- build:repos                       Clone and install main repos
- db:import <dump path> <db name>   Import database dump (gzip)
- db:use <db name>                  Switch to database

Resources

To do

Perfs

  • Add Redis server to check if instance is faster that way

Permissions

Composer

  • execute @site:custom scripts
    • figure out replacement of wp commands

Images

  • reverse proxy
    • similar to nginx, but for Apache2

Rewrite rules

  • adapt to Apache2

WPML

  • String Translation issues writing in languages folder