The following instructions are based on http://mozilla-pontoon.readthedocs.io/en/latest/dev/install.html.
-
clone Pontoon and cd into it; this will be the working directory for the rest of this how-to:
git clone --recursive https://github.com/mozilla/pontoon.git cd pontoon
-
copy
Dockerfile
and.env
intopontoon/
-
build the image and call it "pontoon"
docker build -t pontoon .
-
start the container:
docker run -itp 8000:8000 -v $(pwd):/srv/pontoon pontoon "/bin/bash"
-
install dependencies:
pip install --require-hashes -r requirements-dev.txt; npm install
-
start PostgreSQL and run migrations:
service postgresql start python manage.py migrate python manage.py sync_projects --no-commit pontoon-intro
-
create the admin user (make sure you use your Firefox Accounts email address):
python manage.py createsuperuser python manage.py updatefxaprovider
-
run Django:
python manage.py runserver 0.0.0.0:8000
-
navigate to http://localhost:8000
-
get the id of the container:
docker ps
-
commit changes to the container and overwrite the "pontoon" image:
docker commit 23f7631a0e0a pontoon
-
host:
docker run -itp 8000:8000 -v $(pwd):/srv/pontoon pontoon "/bin/bash"
-
container:
service postgresql start && sleep 5 && python manage.py runserver 0.0.0.0:8000
Before the
pip install
command for requirements, please addpip install --upgrade pip
. (It wouldn't work here otherwise.)