Skip to content
Wagtail based donation stack
Branch: master
Clone or download
patjouk Merge pull request #63 from mozilla/dependabot/npm_and_yarn/postcss-c…
…li-6.1.3

Bump postcss-cli from 6.1.2 to 6.1.3
Latest commit bfeecbd Jul 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.devcontainer Add dockerfiles Jun 27, 2019
dockerfiles Switch to using django-environ and clean up settings. Jul 2, 2019
donate Collect first and last name separately on details form. Jul 18, 2019
source Add support for Paypal single and monthly payments. Jul 17, 2019
travis-scripts Fix up npm tests and update JS and CSS to conform to linters. Jul 16, 2019
.eslintrc.json Fix up npm tests and update JS and CSS to conform to linters. Jul 16, 2019
.gitignore Update application paths in various places. Jul 2, 2019
.sass-lint.yml Adding sass-lint config Jul 10, 2019
.stylelintrc Fix up npm tests and update JS and CSS to conform to linters. Jul 16, 2019
.stylelintrc-colors.js Fix up npm tests and update JS and CSS to conform to linters. Jul 16, 2019
.travis.yml Fix up npm tests and update JS and CSS to conform to linters. Jul 16, 2019
CODE_OF_CONDUCT.md First commit: readme, gitignore, code of coduct and license Jun 27, 2019
LICENSE First commit: readme, gitignore, code of coduct and license Jun 27, 2019
Pipfile unpin factory-boy Jul 16, 2019
Pipfile.lock unpin factory-boy Jul 16, 2019
Procfile Add heroku release commands and drop unnecessary directory nesting. Jul 2, 2019
README.md Merge branch 'master' into invoke-tasks Jul 16, 2019
app.json Add flow for collecting single card payment with Braintree. Jul 16, 2019
docker-compose.yml We don't need different .env for docker/plain pipenv Jul 10, 2019
env.default Add flow for collecting single card payment with Braintree. Jul 16, 2019
manage.py Add heroku release commands and drop unnecessary directory nesting. Jul 2, 2019
package-lock.json Merge branch 'master' into dependabot/npm_and_yarn/postcss-cli-6.1.3 Jul 18, 2019
package.json Merge branch 'master' into dependabot/npm_and_yarn/postcss-cli-6.1.3 Jul 18, 2019
release-steps.sh Add gunicorn dependency. Jul 2, 2019
runtime.txt Heroku setup Jun 27, 2019
tasks.py Merge branch 'invoke-tasks' into fix-npm Jul 16, 2019
tox.ini WIP - core project setup Jun 28, 2019
webpack.config.js Add support for Paypal single and monthly payments. Jul 17, 2019

README.md

donate-wagtail

Build Status

Notes on Docker

It should be possible to connect the python virtual env inside the container to your IDE (tested with pycharm and vscode), if you run into issues, ping patjouk on slack.

How to Setup your Dev Environment with Docker

  • Install Docker Desktop (macOS and Windows). For Linux users: install Docker CE and Docker Compose. If you don't want to create a Docker account, direct links to download can be found in this issue,
  • Check your install by running docker run hello-world,
  • Install Invoke,
  • If relevant: delete your node_modules directory (rm -rf node_modules). It's not necessary, but it speeds up the install.
  • Run inv docker-setup.

When it's done, run docker-compose up, wait until the static files to be built, and go to 0.0.0.0:8000. When you want to stop, do ^C to shut down your containers.

Invoke tasks

Invoke is a python tasks runner that creates shortcuts for commands we frequently use. For example, instead of docker-compose run --rm backend pipenv manage.py migrate, you can use inv docker-migrate. It can also be used to run management commands: inv docker-manage load-fake-data. If you need to add multiple args to an invoke commands, use quotes. ex: invoke docker-npm "install moment"

Installation instructions: https://www.pyinvoke.org/installing.html

With Docker

Invoke tasks available:

  • inv -l: list available tasks,
  • inv docker-catch-up (docker-catchup): Rebuild images and apply migrations
  • inv docker-makemigrations: Creates new migration(s)
  • inv docker-manage: Shorthand to manage.py. ex: inv docker-manage "[COMMAND] [ARG]"
  • inv docker-migrate: Updates database schema
  • inv docker-npm: Shorthand to npm. ex: inv docker-npm "[COMMAND] [ARG]"
  • inv docker-nuke-db: Delete your database and create a new one with fake data
  • inv docker-pipenv: Shorthand to pipenv. ex: inv docker-pipenv "[COMMAND] [ARG]"
  • inv docker-setup: Prepare your dev environment after a fresh git clone
  • inv docker-test-python: Run python tests

Use docker-compose up/down to start or shutdown the dev server.

note: use inv docker-setup when you've just cloned the repo. If you did a git pull on master and want to install the latest dependencies and apply migrations, use inv docker-catchup instead.

Without Docker

Invoke tasks available:

  • inv -l: list available tasks,
  • inv catch-up (catchup): Install dependencies and apply migrations
  • inv makemigrations: Creates new migration(s)
  • inv manage: Shorthand to manage.py. ex: inv manage "[COMMAND] [ARG]"
  • inv migrate: Updates database schema
  • inv setup: Prepare your dev environment after a fresh git clone
  • inv test: Run python tests
  • inv runserver: Start a web server

note: use inv setup when you've just cloned the repo. If you did a git pull on master and want to install the latest dependencies and apply migrations, use inv catchup instead.

Without Invoke

Running commands inside the Docker container

When the Django server is running, you can start the Django shell with:

docker-compose exec backend pipenv run python manage.py shell

Running tests

Run the back-end test suite with:

docker-compose exec backend pipenv run python manage.py test --settings=donate.settings_test
You can’t perform that action at this time.