This is the main development environment for working on Mozilla payments.
- Python
- Docker
- On Mac you can run this with VirtualBox and Boot2Docker or Kitematic
- docker-compose
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/
The following instructions are for developing on the code only.
- Check out the following repositories somewhere on your machine:
- Run
python link.py
to connect your source. - Export any project-specific environment variables in your shell.
- Example: for Solitude you'll need to
export braintree variables
such as
BRAINTREE_MERCHANT_ID=...
.
- Example: for Solitude you'll need to
export braintree variables
such as
- Run
docker-compose build
to build the containers. - Run
docker-compose 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. - Open the example site at http://pay.dev/
Now you're good to go!
To keep everything up to date, 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. - Run
docker-compose build
to rebuild containers 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 contain the application source.