improvements to travis and dbench (#53)

This PR adds the `bench` script, which aims for near parity with frappe bench, it makes setting up far easier, because instead of running `./dbench -c "new-site site1.local"` you only white what you would if bench was installed on the local system (i.e. `./bench new-site site1.local`), it also adds other features as well.
This commit is contained in:
chabad360
2018-10-12 20:05:29 -07:00
committed by Chinmay Pai
parent e079c479f5
commit 2b1334d5a5
4 changed files with 74 additions and 86 deletions

View File

@@ -2,20 +2,17 @@ language: python
python:
- "2.7"
env:
- DOCKER_COMPOSE_VERSION: 1.8.0
- DOCKER_COMPOSE_VERSION: 1.22.0
services:
- docker
install:
- docker-compose build
- docker-compose up -d
- docker exec -it -u root frappe bash -c "cd /home/frappe && chown -R frappe:frappe ./*"
- docker exec -i frappe bash -c "cd .. && bench init frappe-bench --ignore-exist --skip-redis-config-generation && cd frappe-bench"
- docker exec -i frappe bash -c "mv Procfile_docker Procfile && mv sites/common_site_config_docker.json sites/common_site_config.json"
- docker exec -i frappe bash -c "bench new-site site1.local"
- docker exec -i -u root frappe bash -c "echo 127.0.0.1 site1.local >> /etc/hosts"
- sudo su -c 'echo 127.0.0.1 site1.local >> /etc/hosts'
- chmod ugo+x ./dbench
- ./dbench setup docker
- ./dbench init frappe-bench
- ./dbench new-site site1.local
- sudo ./dbench setup hosts
- pip install --upgrade virtualenv
- virtualenv -p python3 testenv
- source testenv/bin/activate