2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-12-25 03:16:02 +00:00
frappe_docker/tests/test-erpnext.sh

45 lines
968 B
Bash
Raw Normal View History

2021-11-04 12:31:49 +00:00
#!/bin/bash
set -e
source tests/functions.sh
project_name="test_erpnext"
SITE_NAME="test_erpnext.localhost"
echo ::group::Setup env
cp env-example .env
sed -i -e "s/edge/test/g" .env
2021-11-04 12:31:49 +00:00
# shellcheck disable=SC2046
export $(cat .env)
cat .env
print_group Start services
docker-compose \
2021-12-10 08:56:18 +00:00
-p $project_name \
-f installation/docker-compose-common.yml \
-f installation/docker-compose-erpnext.yml \
-f installation/erpnext-publish.yml \
up -d
2021-11-04 12:31:49 +00:00
print_group Fix permissions
2021-11-22 07:47:17 +00:00
docker run \
2021-12-10 08:56:18 +00:00
--rm \
--user root \
-v ${project_name}_sites-vol:/sites \
-v ${project_name}_assets-vol:/assets \
-v ${project_name}_logs-vol:/logs \
frappe/erpnext-worker:test chown -R 1000:1000 /logs /sites /assets
2021-11-22 07:47:17 +00:00
2021-11-04 12:31:49 +00:00
print_group Create site
docker run \
2021-12-10 08:56:18 +00:00
--rm \
-e "SITE_NAME=$SITE_NAME" \
-e "INSTALL_APPS=erpnext" \
-v ${project_name}_sites-vol:/home/frappe/frappe-bench/sites \
--network ${project_name}_default \
frappe/erpnext-worker:test new
2021-11-04 12:31:49 +00:00
ping_site
rm .env