mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-21 15:25:09 +00:00
fixed travis and added a bit to dbench
This commit is contained in:
parent
3c469b0e4a
commit
bf83486dcc
2 changed files with 10 additions and 10 deletions
|
|
@ -12,9 +12,8 @@ services:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- docker-compose build
|
- ./dbench --setup
|
||||||
- docker-compose up -d
|
- ./dbench --init
|
||||||
- ./dbench init
|
|
||||||
- pip install --upgrade virtualenv
|
- pip install --upgrade virtualenv
|
||||||
- virtualenv -p python3 testenv
|
- virtualenv -p python3 testenv
|
||||||
- source testenv/bin/activate
|
- source testenv/bin/activate
|
||||||
|
|
|
||||||
13
dbench
13
dbench
|
|
@ -7,7 +7,7 @@ function usage {
|
||||||
echo ' -h show this help text'
|
echo ' -h show this help text'
|
||||||
echo ' -d [sitename] enables developer mode for specified site'
|
echo ' -d [sitename] enables developer mode for specified site'
|
||||||
echo ' -a adds site-names to /etc/hosts file in the container to facilitate multisite access'
|
echo ' -a adds site-names to /etc/hosts file in the container to facilitate multisite access'
|
||||||
echo ' --setup starts up and builds docker'
|
echo ' --setup starts up and builds docker, NOTE: assumes you have docker installed'
|
||||||
echo ' --init [-e | -d] [sitename] initializes frappe-bench in docker and adds a site "sitename" (if not specified, it will default to site1.local)'
|
echo ' --init [-e | -d] [sitename] initializes frappe-bench in docker and adds a site "sitename" (if not specified, it will default to site1.local)'
|
||||||
echo ' -e initializes frappe-bench and installs erpnext'
|
echo ' -e initializes frappe-bench and installs erpnext'
|
||||||
echo ' -d initializes frappe-bench and enables developer mode'
|
echo ' -d initializes frappe-bench and enables developer mode'
|
||||||
|
|
@ -36,14 +36,14 @@ elif [ $1 == '--init' ]; then
|
||||||
if ! $3; then set -- "${@:1:2}" "site1.local" && site=$3; fi
|
if ! $3; then set -- "${@:1:2}" "site1.local" && site=$3; fi
|
||||||
if ! $4; then set -- "${@:1:2:3}" "site1.local" && site=$4; fi
|
if ! $4; then set -- "${@:1:2:3}" "site1.local" && site=$4; fi
|
||||||
frappe_installer $site
|
frappe_installer $site
|
||||||
if [ $2 == '-e' ]; then
|
if [ "$2" == '-e' ]; then
|
||||||
echo "installing erpnext"
|
echo "installing erpnext"
|
||||||
docker exec -it frappe bash -c "bench get-app erpnext"
|
docker exec -it frappe bash -c "bench get-app erpnext"
|
||||||
docker exec -it frappe bash -c "bench --site $site install-app erpnext"
|
docker exec -it frappe bash -c "bench --site $site install-app erpnext"
|
||||||
echo "finished"
|
echo "finished"
|
||||||
elif [ $2 == '-d' ]; then
|
elif [ "$2" == '-d' ]; then
|
||||||
docker exec -it -u root frappe bash -c "bench --site $site set-config \"developer_mode\" 1 && bench clear-cache"
|
docker exec -it -u root frappe bash -c "bench --site $site set-config \"developer_mode\" 1 && bench clear-cache"
|
||||||
elif [ $2 == '-ed' ]; then
|
elif [ "$2" == '-ed' ]; then
|
||||||
echo "installing erpnext"
|
echo "installing erpnext"
|
||||||
docker exec -it frappe bash -c "bench get-app erpnext"
|
docker exec -it frappe bash -c "bench get-app erpnext"
|
||||||
docker exec -it frappe bash -c "bench --site $site install-app erpnext"
|
docker exec -it frappe bash -c "bench --site $site install-app erpnext"
|
||||||
|
|
@ -51,8 +51,9 @@ elif [ $1 == '--init' ]; then
|
||||||
echo "finished"
|
echo "finished"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [ $1 == '--setup' ]; then
|
elif [ "$1" == '--setup' ]; then
|
||||||
frappe_installer
|
docker-compose build
|
||||||
|
docker-compose up -d
|
||||||
else
|
else
|
||||||
while getopts ':had:' option; do
|
while getopts ':had:' option; do
|
||||||
case "$option" in
|
case "$option" in
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue