Platform for Mozilla Support
Перейти к файлу
Kasey Kelly 8c98d17025 fix product page regression 2019-12-20 07:32:15 -05:00
.circleci
bin Add scss files into static. 2019-12-10 17:30:37 +02:00
configs
docker/bin
docs Remove gulp from the project. 2019-11-28 22:17:32 +02:00
jsi18n
k8s
kitsune fix product page regression 2019-12-20 07:32:15 -05:00
media
requirements
scripts
styleguide profile pages, including modals and notifications 2019-12-18 13:55:23 -05:00
tests
wsgi
.adr-dir
.dockerignore
.editorconfig
.env-build
.env-dist
.env-test
.eslintrc
.gitignore added fonts back because removing them broke the less build 2019-12-04 21:25:38 -05:00
.pre-commit-config.yaml
.stylelintrc
.travis.yml
CODE_OF_CONDUCT.md
CONTRIBUTORS.rst
Dockerfile Add scss files into static. 2019-12-10 17:30:37 +02:00
Jenkinsfile
LICENSE
Makefile homepage WIP in styleguide 2019-12-10 13:35:47 +02:00
Procfile
README.md Add basic documentation for browser-sync. 2019-12-11 16:05:42 +02:00
contribute.json
docker-compose.yml
jenkins.yml
manage.py
newrelic.ini
package-lock.json fix product page regression 2019-12-20 07:32:15 -05:00
package.json profile pages, including modals and notifications 2019-12-18 13:55:23 -05:00
prepare_django_assets.js
setup.cfg
tox.ini

README.md

Kitsune

Kitsune is the platform that powers SuMo (support.mozilla.org)

It is a Django application. There is documentation online.

You can access the staging site at https://support.allizom.org/

See what's deployed

Code of Conduct

By participating in this project, you're agreeing to uphold the Mozilla Community Participation Guidelines. If you need to report a problem, please see our CODE_OF_CONDUCT.md guide.

Development

To get Kitsune running locally all you really need is to have Docker and Docker Compose installed, and follow the following steps.

  1. Fork this repository & clone it to your local machine.

    git clone https://github.com/mozilla/kitsune.git
    
  2. Pull base Kitsune Docker images, run collectstatic, create your database, and install node packages.

    make init
    make build
    
  3. Run Kitsune.

    make run
    

    This will produce a lot of output (mostly warnings at present). When you see the following the server will be ready:

    web_1              | Starting development server at http://0.0.0.0:8000/
    web_1              | Quit the server with CONTROL-C.
    

The running instance will be located at http://localhost:8000/ unless you specified otherwise, and the administrative control panel will be at http://localhost:8000/admin/.

Another way you might choose to run the app (step 3 above) is by getting a shell in the container and then manually running the Django dev server from there. This should make frequent restarts of the server a lot faster and easier if you need to do that:

make runshell
bin/run-dev.sh

The end result of this method should be the same as using make run, but will potentially aid in debugging and act much more like developing without Docker as you may be used to. You should use make runshell here instead of make shell as the latter does not bind port 8000 which you need to be able to load the site.

Run make help to see other helpful commands.

Finally you can run the development server with instance reloading through browser-sync.

npm start

The running instance in this case will be located at http://localhost:3000/.

Compiling LESS files

By default, the .less files do not compile in local development because it impacts load times on OSX. If you are working on .less files, you can enable compilation with the following environment variable:

echo "PIPELINE_COLLECTOR_ENABLED=True" >> .env

The Admin

After the above you can do some optional steps if you want to use the admin:

  • Enable the admin control panel

    echo "ENABLE_ADMIN=True" >> .env
    
  • Create a superuser

    docker-compose exec web ./manage.py createsuperuser
    
  • Create some data

    docker-compose exec web ./manage.py generatedata
    
  • Update product details

    docker-compose exec web ./manage.py update_product_details
    

Get Search Working

First, make sure you have run the "Create some data" step above.

  1. Enter the web container: docker-compose exec web bash
  2. Build the indicies: ./manage.py esreindex (You may need to pass the --delete flag)
  3. Precompile the nunjucks templates: ./manage.py nunjucks_precompile