-
Notifications
You must be signed in to change notification settings - Fork 10
/
.outrigger.yml
130 lines (110 loc) · 3.68 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.
# Usually should be the same as the project directory.
# Also set this in .env file and use all lower-case names.
project: project
# 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 $PWD/build.yml run --rm
bash:
alias: bash
description: Open a bash shell in the CLI container.
run:
- docker-compose -f $PWD/build.yml run --rm cli
init:
alias: init
description: Run the end-to-end repository initialization and site install script.
run:
# Set the PROJECT_ROOT environment variable to the current directory
- sed -i '' "s%^PROJECT_ROOT.*%PROJECT_ROOT=${PWD##*/}%" .env
# Start containers and setup the site
- rig project run:welcome
- rig project up
- docker-compose -f $PWD/build.yml run --rm cli /var/www/bin/init.sh
setup:
alias: setup
description: Alternate alias for "rig project init"
run:
- rig project init
up:
alias: up
description: Start up operational docker containers and filesystem sync.
run:
- rig project sync:start
- docker-compose up -d
start:
alias: start
description: Alternate alias for "rig project up"
run:
- rig project up
stop:
alias: stop
description: Halt operational containers and filesystem sync.
run:
- docker-compose stop
- rig project sync:stop
restart:
alias: restart
description: Restart containers.
run:
- docker-compose stop
- docker-compose up -d
rebuild:
alias: rebuild
description: Run the end-to-end build process.
run:
- docker-compose -f $PWD/build.yml run --rm cli /var/www/bin/rebuild.sh
theme:
alias: theme
description: Compile all theme assets, activate watch, and start up pattern-lab.
run:
- docker-compose -f $PWD/build.yml run --rm theme
npm:
alias: npm
description: Run npm install for theme.
run:
- docker-compose -f $PWD/build.yml run --rm npm install
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=${PROJECT_ROOT}"
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
welcome:
alias: tour
description: Codebase orientation.
run:
- echo 'Welcome to the Project!'
- echo 'Please review the README.md to customize your project.'
- echo 'All custom code is under src/'
# This controls configuration for the `project sync:start` command.
sync:
# This is the name of the external volume to use.
# Will default to the directory name. If you change it here, also change
# the PROJECT_ROOT environment variable in .env file.
#
# volume: PROJECT_ROOT-sync
#
# These ignores will be added to unison and not synced between local and project volume
ignore:
# - "Path vendor"
# - "Name node_modules"
- "Name .idea"