-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ahoy.yml
55 lines (45 loc) · 1.35 KB
/
.ahoy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
ahoyapi: v2
commands:
up:
cmd: |
docker compose up -d
down:
cmd: |
docker compose stop "$@"
remove:
cmd: |
if [ "$1" == "y" ]; then
docker compose down --volumes
else
ahoy confirm "Running this command will destroy your current site, database and build? Are you sure you didn't mean ahoy stop?" &&
# Run this if confirm returns true
docker compose down --volumes ||
# Run this if confirm returns false
echo "OK, probably a wise choice..."
fi
build:
cmd:
docker compose up -d --build
cli:
cmd:
docker compose exec drupal bash
drush:
cmd:
docker compose exec -T drupal drush "$@"
import:
cmd: |
if [ -e "$@" ] ; then
docker compose exec drupal bash -c 'drush sql-drop -y' &&
docker compose exec -T drupal bash -c 'drush sql-cli' < "$@"
else echo "Provided sql file" "$@" "does not exist"
fi
dump:
cmd:
docker compose exec -T drupal bash -c 'drush sql-dump --extra-dump=--no-tablespaces' > "$@"
site-install:
cmd:
source .env && ahoy drush si standard --db-url=mysql://${DB_USER}:${DB_PASS}@mysql/${DB_NAME} --site-name="JWRF" --account-name="${SU_USER}" --account-pass="${SU_PASS}"
confirm:
cmd: read -r -p "${@} [y/N] " response; [ ${response} = "y" ]
hide: true