Skip to content

Developing

Caution

This documentation is a for legacy version of the purplship-server (up to 2021.7).

Please visit purplship.com/docs for the latest documentation.

  • A bash compatible shell (OSX, Linux or Windows Linux subsystem)
  • Docker and docker-compose

Clone the repo

git clone git@github.com:purplship/purplship-server.git

Source the bash script

cd purplship-server

source ./script.sh

Initialize the dev env

env:reset

Info

This command will:

  • create a Python virtual environment using venv in a .env/purplship-server directory at the root of the project
  • activate the python virtual env
  • install the dev dependencies using pip install -r requirements.dev.txt

Setup the database

run:db

Info

This command starts a Postgresql database using docker-compose

Run the tests

test

Info

This command run the tests using Python built-in unittest

Working on the webapp

dev:webapp

Info

This command makes a fresh installation of node_modules under purplship-server/webapp using yarn, then starts the webpack build with watch to automatically rebuild when the webapp is modified and collect the build files as django static files.

Docs

First, make sure you set up your environment as described above, that will install all the requirements.

The documentation uses MkDocs

You can start a local doc server using

docs

Info

This command will run mkdocs serve