Local development with CEO
First, you'll need a few things:
- Access to our private CEO Docker image
Docker is a free download, you will need to contact support for the CEO Docker image.
Using our helper tool, XO, you can easily boot and interact with your CEO Docker image.
XO Requires Python 3
- First, install XO by opening terminal and navigating to your template repository. Then paste in the following command and hit return:
curl -s https://s3.amazonaws.com/static.getsnworks.com/local-dev/setup.sh | /bin/bash
- Your site's settings will be in the
xo.yamlfile that's created by the setup command. By default it will create your development site at
http://localhost:8080, but if you want it at a different port, you can change it here.
- To verify that
xowasn't altered in transit, you can verify its hash by typing:
md5 xoThe hash should match:
- After that, to create the Docker image enter:
- And to start it:
- If you don't have a database dump handy, grab your developer export, drop it into your site's root folder and run:
- You can use
thawto stop and start your image while keeping your existing data safe:
./xo freezewill dump your database and shutdown your image
./xo thawwill start it back up and import your last database
To stop Docker when you're done, type:
If, when running
xo you see an error similar to:
ImportError: No module named parse
That means you're running Python2. Usually this can be corrected by running
python3 xo instead of
With Docker running you can run CEO commands for tasks like adding content to the database, simulating the production environment and other interactions with the headless CEO application.
Running CEO commands is as easy as:
./xo run COMMAND