- Make sure you have Python, its package manager pip and the package virtualenv installed. You can install the latter with
pip install virtualenv
. - Set up a virtual environment inside this folder using
virtualenv -p $(which python3) .venv --prompt "(venv) "
orvirtualenv ./
under Windows. - Enter your virtual environment using
source .venv/bin/activate
or./Scripts/activate.bat
under Windows, or use something like virtualenvwrapper. - Use
pip install -r requirements.txt
to install all back-end dependencies. - Use
npm install
to install front-end dependencies.
- After an update to the back-end, you need to redo setup steps 3 and 4 and run
./manage.py migrate
. - After an update to the front-end, you need to redo setup step 5 and run
gulp build
.
- Make sure you have entered your virtual environment (see step 3 of setup).
- Run the local server
./manage.py runserver
.
gulp build
runs thecopy-fonts
,css
,js
tasks.gulp watch
runs thecss
andjs-all
tasks on every file change.
gulp copy-fonts
copies fonts to the static directory.gulp css
converts SASS to CSS including concatenation and minifaction.gulp js
runs thejs-all
andjs-ie
tasks.gulp js-all
concatenates and minifies all JS files.gulp js-ie
concatenates and minifies all polyfill JS files for Internet Explorer.gulp js-lint
checks all JS files for errors.gulp sass-lint
checks all SASS files for errors.
The project can be run using docker:
docker build -t copyfighters/copyfighters .
docker run -t -d -e DB_HOST=foobar -e DB_PASSWORD=foobar -e RAVEN_DSN=https://... -e EMAIL_HOST=foobar -p 8000:8000 --restart unless-stopped copyfighters/copyfighters