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

44 lines
884 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_frappe"
SITE_NAME="test_frappe.localhost"
docker_compose_with_args() {
# shellcheck disable=SC2068
docker-compose \
-p $project_name \
-f installation/docker-compose-common.yml \
-f installation/docker-compose-frappe.yml \
-f installation/frappe-publish.yml \
$@
}
2021-11-04 12:31:49 +00:00
echo ::group::Setup env
cp env-example .env
sed -i -e "s/edge/test/g" .env
# shellcheck disable=SC2046
export $(cat .env)
cat .env
print_group Start services
docker_compose_with_args up -d
2021-11-04 12:31:49 +00:00
print_group Create site
docker run \
--rm \
-e "SITE_NAME=$SITE_NAME" \
-v ${project_name}_sites-vol:/home/frappe/frappe-bench/sites \
--network ${project_name}_default \
frappe/frappe-worker:test new
ping_site
print_group Stop and remove containers
docker_compose_with_args down
2021-11-04 12:31:49 +00:00
rm .env