The following describes how to set up an instance of the site on your computer for development with Docker and docker-compose.
These installation steps are made for development only. It is not recommended to run Pontoon via Docker in production.
Clone your fork <http://help.github.com/fork-a-repo/> of Pontoon repository:
$ git clone https://github.com/YOUR-USERNAME/pontoon.git
From the root of the repository, run:
$ make build
That will build the containers required for development: base and webapp.
If you want to share your development instance in your local network, you set SITE_URL to bind the webapp to any address you like.:
$ make build SITE_URL="https://192.168.1.14:8000"
Run the webapp:
$ make run
The first time you run this, the PostgreSQL container needs to do some work before it becomes available to the webapp container. Hence, the webapp might not be able to perform things like migrations. You can simply wait for the postgresql container to report that it’s ready, then abort the process, then restart it. That should let the webapp do all its setup as expected.
Alternatively, you can run
docker-compose up postgresqland wait until it reports that the database is ready, then stop that and run
Finally, you need to run some setup steps, while the webapp is running:
$ make setup
This will ask you to create a superuser, and then will update your Firefox account settings.
The app should now be available at http://localhost:8000 or the custom SITE_URL.
After you execute
make run, the console output might trick you into accessing Pontoon in the browser at http://localhost:3000/. Note that the URL only refers to the frontend app, which is not meant to be used standalone.
To access Pontoon app, you should use http://localhost:8000 or the custom SITE_URL.
And with that, you’re ready to start Contributing!