mirror of
https://github.com/frappe/frappe_docker.git
synced 2025-01-24 07:38:33 +00:00
bench setup anything-else should work now (#56)
This commit is contained in:
parent
6fc3bfbdcf
commit
86d138e8e3
6
dbench
6
dbench
@ -6,14 +6,13 @@ elif [ "$1" == 'init' ]; then
|
|||||||
docker exec -itu root frappe bash -c "cd /home/frappe && chown -R frappe:frappe ./*"
|
docker exec -itu 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 "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 && bench set-mariadb-host mariadb"
|
docker exec -i frappe bash -c "mv Procfile_docker Procfile && mv sites/common_site_config_docker.json sites/common_site_config.json && bench set-mariadb-host mariadb"
|
||||||
elif [ "$1" == 'setup' ]; then
|
elif [ "$1" == 'setup' ] && [ "$2" == 'docker' ]; then
|
||||||
if [ "$2" == 'docker' ]; then
|
|
||||||
if [ "$3" == '--swarm-mode' ]; then
|
if [ "$3" == '--swarm-mode' ]; then
|
||||||
echo "Docker swarm mode is not currently supported"
|
echo "Docker swarm mode is not currently supported"
|
||||||
else
|
else
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
fi
|
fi
|
||||||
elif [ "$2" == 'hosts' ]; then
|
elif [ "$1" == 'setup' ] && [ "$2" == 'hosts' ]; then
|
||||||
a=$(cd frappe-bench && ls sites/*/site_config.json | grep -o '/.\+/')
|
a=$(cd frappe-bench && ls sites/*/site_config.json | grep -o '/.\+/')
|
||||||
a="${a//$'\n'/ }"
|
a="${a//$'\n'/ }"
|
||||||
a=$(echo $a | tr -d / )
|
a=$(echo $a | tr -d / )
|
||||||
@ -21,7 +20,6 @@ elif [ "$1" == 'setup' ]; then
|
|||||||
echo $result | sudo tee -a /etc/hosts
|
echo $result | sudo tee -a /etc/hosts
|
||||||
docker exec -iu root frappe bash -c "echo ${result} | tee --append /etc/hosts"
|
docker exec -iu root frappe bash -c "echo ${result} | tee --append /etc/hosts"
|
||||||
docker exec -itu root frappe bash -c "printf '# User rules for frappe\nfrappe ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/frappe"
|
docker exec -itu root frappe bash -c "printf '# User rules for frappe\nfrappe ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/frappe"
|
||||||
fi
|
|
||||||
elif [ "$1" == '-c' ]; then
|
elif [ "$1" == '-c' ]; then
|
||||||
shift
|
shift
|
||||||
user=$1
|
user=$1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user