-
Notifications
You must be signed in to change notification settings - Fork 0
/
outrigger.yml
130 lines (112 loc) · 4.58 KB
/
outrigger.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
##
# This is an Outrigger configuration file used by rig project commands.
##
version: 1.0
# This is prepended to the $PATH for any commands referenced in the scripts section.
bin: ./bin:./node_modules/.bin:./vendor/bin
# This is not currently used but we include it in anticipation of great things.
project: madness
# Project Scripts
# These can be run via 'rig project run:<key>'
# If you specify an alias, you can run 'rig project <alias>'
scripts:
run:
alias: run
description: Run one of the build container services such as 'cli' or 'drush'.
run:
- docker-compose -f build.yml run --rm
up:
alias: up
description: Start up operational docker containers and filesystem sync.
run:
- rig project sync:start
- docker-compose up -d
stop:
alias: stop
description: Halt operational containers and filesystem sync.
run:
- docker-compose stop
- rig project sync:stop
build:
alias: build
description: Run the end-to-end build process.
run:
# COMPOSE_FILE is an environment variable provided by docker-compose.
# It is an alternative to the -f flag which selects config files.
# We use different docker-compose configurations for Linux than for macOS
# or Windows, because Linux can run Docker natively while others need
# a Virtual Machine.
#
# Environment variables set in configured scripts this way only last
# until the end of the script execution.
#
# See https://docs.docker.com/compose/reference/envvars/#compose_file
# See https://docs.docker.com/compose/reference/overview/#use--f-to-specify-name-and-path-of-one-or-more-compose-files
- export COMPOSE_FILE=build.yml
- docker-compose run --rm cli "NPM_CONFIG_LOGLEVEL=error npm install"
- docker-compose run --rm grunt --timer
install:
alias: install
description: Install the Drupal site.
run:
- echo "'grunt install' is defined as a grunt task."
- echo "Drop the --no-db-load to auto-load build/backups/latest.sql.gz if present."
- export COMPOSE_FILE=build.yml
- docker-compose run --rm grunt install --no-db-load
- echo "Visit $(docker-compose run --rm drush sa @madness --format=list --fields=uri)"
update:
description: Update the Drupal database to match current code.
run:
- echo "'grunt update' is defined in Gruntconfig.json\n"
- export COMPOSE_FILE=build.yml
- docker-compose run --rm grunt update
- echo "Visit $(docker-compose run --rm drush sa @madness --format=list --fields=uri)"
theme:
alias: theme
description: Compile all theme assets, activate watch, and start up pattern-lab.
run:
- docker-compose -f build.yml run --rm theme
fix-permissions:
alias: fix-perms
description: Fix permissions for Apache to run code and access files. (Automatically run as part of rig project install.)
run:
- docker-compose exec www /var/www/bin/fix-perms.sh
# grunt cache-clear is defined in Gruntconfig.json as an abstraction over drush cc all and drush cr
- docker-compose -f build.yml run --rm grunt cache-clear
ps:
description: Get a list of all containers associated with this project. Unlike docker-compose ps, this will include all containers even for different configuration files.
run:
- docker ps -a --filter "label=outrigger.project=madness"
all-stop:
description: Halt all containers associated with this project.
run:
- rig project run:ps -- -q | xargs docker stop
logs:
alias: logs
description: Stream the logs produced by your Docker project containers. To limit output add '--tail=20'.
run:
- docker-compose logs -ft
setup:
alias: setup
description: Run the end-to-end repository initialization and site install script.
run:
- rig project run:welcome
- echo "Continuing with 'rig project setup'..."
- rig project up
- rig project build
- rig project install
- rig project run "grunt seed-users"
- echo "Congratulations, your new madness instance is fully set up."
- echo "From now on, use 'rig project up' to start your work sessions."
welcome:
alias: tour
description: Codebase orientation.
run:
- echo 'Welcome to the Project!'
- echo 'Please review the README.md, CONTRIBUTING.md, TODOS.md, and the docs/ folder.'
- echo 'All custom code is under src/'
- echo 'To get started, run "rig project setup"'
# This controls configuration for the `project sync:start` command.
sync:
# This is the name of the external volume to use.
volume: madness-sync