docker-machine create -d virtualbox testdriven-dev
eval "$(docker-machine env testdriven-dev)"
docker-compose build
docker-compose up -d
TESTDRIVEN_IP="$(docker-machine ip testdriven-dev)"
curl http://$TESTDRIVEN_IP:5001/ping
docker-compose logs -f users-service
docker-machine rm testdriven
docker-compose -f docker-compose-dev.yml run users-service python manage.py test
docker-compose -f docker-compose-dev.yml run users-service python manage.py cov
docker-compose -f docker-compose-dev.yml run users-service flake8 project
docker-compose -f docker-compose-dev.yml up -d --build
eval "$(docker-machine env testdriven-dev)"
docker stop $(docker ps -a -q)
docker-compose logs -f users-service
docker-machine ip testdriven
http://192.168.99.100:5001/users
docker-compose -f docker-compose-dev.yml run users-service python manage.py recreate_db
docker-compose -f docker-compose-dev.yml run users-service python manage.py seed_db
IAM -> Create User
User name: testdriven
Groups: Test
Group Policy: AdministratorAccess
Region: us-east-1a
[Create a ~/.aws/credentials file](http://docs.aws.amazon.com/cli/latest/userguide/cli-config-files.html)
aws configure
Git access keys here.
docker-machine create --driver amazonec2 awstestdriven
docker-machine env awstestdriven
eval $(docker-machine env testdriven-prod)
Spin up the containers, create the database, seed, and run the tests:
docker-compose -f docker-compose-prod.yml up -d --build
docker-compose -f docker-compose-prod.yml run users-service python manage.py recreate_db
docker-compose -f docker-compose-prod.yml run users-service python manage.py seed_db
docker-compose -f docker-compose-prod.yml run users-service python manage.py test
docker-machine ip testdriven-prod
Check environment
docker-compose -f docker-compose-prod.yml run users-service env
docker-machine regenerate-certs testdriven-prod
- Start virtualbox - virtualbox
- Select the VM and click "start"
- Exit the VM and select "Power off the machine"
- Exit virtualbox
docker-compose stop
docker-compose down
docker-compose build --no-cache
docker rmi $(docker images -q)
docker exec -ti users-db psql -U postgres -W
\c users_dev
select * from users;
cd client
npm start
cd client
npm test