-
Notifications
You must be signed in to change notification settings - Fork 7
Development
Ensure these are installed before continuing.
- Python 3.7 or Python 3.6
- Pipenv
- npm
- Postgres
You can change Pipeline's settings to use SQLite instead of Postgres, but this is not recommended because Pipeline relies on Postgres's full-text search features.
Pipeline is written in Python. It uses Sass and PostCSS on the frontend with webpack to glue them together.
Pipeline expects to be able to connect to a Postgres database named pipeline. To set this up on macOS:
brew install postgresql
brew services start postgresql
createdb pipeline
git clone git@github.com:thepoly/pipeline.git
cd pipeline
npm install
npx wp --config webpack.development.config.js
pipenv install --dev
pipenv run python manage.py createcachetable
pipenv shell
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
If you have issues with the database, ensure that Postgres is running and you have created a database named pipeline.
Pipeline can also be run in its production configuration with Docker. It requires three containers: one for running the Django project with gunicorn, another to put nginx in front of it and additionally serve static files, and finally a Postgres container.
docker-compose up
Ensure that the SECRET_KEY environment variable is set. Additionally, run the following inside of the django container (e.g. docker-compose exec django bash):
python manage.py migrate
python manage.py createsuperuser
Pipeline will be available at port 8000 on localhost.
Make sure you format your code with Black and use Flake8 to find problems.
With your terminal/command prompt running python manage.py runserver, open another at the project folder location and run npm run watch.
Now you can edit styles at pipeline/pipeline/static/css/pipeline.scss