Sign inSign up

smartlab/plonecli

By smartlab

•Updated over 8 years ago

Docker to run plonecli faster https://smartlab.mpt.mp.br/

Image
1

215

smartlab/plonecli repository overview

GOLD TIP: Please, make sure that you will map always the same local folder to a docker folder before running the plonecli build command. This will make your life easier (and faster).


⁠How to play

Note: Is strongly recommend to always map the same folder to a docker as is in example.

$ mkdir buildout $ chown 500 buildout $ cd buildout $ docker run -it -p 8080:8080 -v echo $PWD:/tmp/buildout plone /bin/bash $ plonecli -l

Pay attention: This docker don't run automatically. You need to do some plonecli commands to up and run your project ouside mapped inside.


⁠PloneCli Usage

$ plonecli --help
Usage: plonecli [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...

  Plone Command Line Interface (CLI)

Options:
  -l, --list-templates
  --help                Show this message and exit.

Commands:
  build         Bootstrap and build the package
  buildout      Run the package buildout
  create        Create a new Plone package
  debug         Run the Plone client in debug mode
  requirements  Install the local package requirements
  serve         Run the Plone client in foreground mode
  virtualenv    Create/update the local virtual environment...

⁠Creating A Plone Add-on

$ plonecli -l
Available mr.bob templates:
 - buildout
 - addon
  - vocabulary
  - theme
  - content_type
 - theme_package

$ plonecli create addon smartlab.todo

⁠Adding Features To Your Plone Add-on

$ cd smartlab.todo
$ plonecli -l
templates:
 - content_type
 - theme
 - vocabulary

$ plonecli add content_type
$ plonecli add vocabulary
$ plonecli add theme

⁠Build Your Package

$ plonecli build

This will run:

$ virtualenv .
$ ./bin/pip install -r requirements.txt --upgrade
$ ./bin/buildout

in your target directory.

If you want to reset your build use the --clean option on build. This will clear your virtualenv before installing the requirements and also running buildout with -n to get the newest versions.

NOTE:: The first run take a long time to run because it's the first time tha you build the packages.


⁠Run Your Application

$ plonecli serve

⁠Run Tests for Application

$ plonecli test

or including Robot tests:

$ plonecli test --all

⁠Combining Commands

You can combine the steps above like this:

$ plonecli create addon smartlab.todo build test --all serve

⁠Contribute


⁠License

This project is licensed under the BSD license.

Tag summary

Content type

Image

Digest

Size

137.1 MB

Last updated

over 8 years ago

docker pull smartlab/plonecli