This is the main development environment for working on Mozilla payments.
The following instructions are for using pre-built containers for deployment or QA purposes.
-
git clone https://github.com/mozilla/payments-env.git
-
cd payments-env
-
docker-compose -f docker-compose-deploy.yml up -d
-
Find the IP address of your docker system.
- On OS X using boot2docker you can find the address of a container by
boot2docker ip
- On OS X using boot2docker you can find the address of a container by
-
Edit your
/etc/hosts
file so that the hostpay.dev
resolves to your IP. For example, you might add this line to/etc/hosts
:192.168.59.103 pay.dev
-
Run
docker-compose up -d
-
Open the example site at http://pay.dev/
Bootstrap your Payments environment by checking out this repository and running
the bootstrap.py
command. It will automatically check out all other repos
into a directory next to your payments-env
directory named
mozilla-payments
, download the appropriate Docker images, and start them.
The only things left will be output at the end of the bootstrap, naming
changing your /etc/hosts
file to map your Docker's IP to pay.dev
and
sourcing the created ENV file from your shell for the Braintree Environment
variables.
Once you're done, open the example site at http://pay.dev/.
Now you're good to go!
Run ./update-repos.sh
to pull the latest version of the master branch
on all repos, get new Docker images, and restart all Docker images.
To do this manually, run these commands:
- Run
git pull
in each linked repository (or only inpayments-env
if you're using pre-built containers). - Run
docker-compose stop
to make sure all containers are not running. - Run
docker-compose pull
to get the latest images and rebuild if necessary. - Run
docker-compose up -d
to start the new containers.
There are two docker configurations:
docker-compose.yml
is for development purposes and requires the source to be checked out.docker-compose-deploy.yml
is for deployment purposes and contains the application source.
If you update the nginx image, run the command build-and-push.sh
. This will update the image and push it to docker hub.
Test are run on circle ci for payments-env. We need to figure out how to run them regularly.