-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpackage.json
30 lines (30 loc) · 2.39 KB
/
package.json
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
{
"name": "docker-wordpress-starterkit",
"version": "0.0.0",
"description": "Starter kit for running Wordpress in development using Docker",
"main": "index.js",
"config": {
"repo": "https://github.com/roots/bedrock.git"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"bedrock:init": "git clone $npm_package_config_repo bedrock && cp .env.example bedrock/.env",
"docker:dev": "npm run docker:build -s && npm run docker:up -s",
"docker:build": "docker-compose build",
"docker:up": "docker-compose up",
"docker:up:daemon": "echo 'Starting services in background.' && npm run docker:up -s -- -d && echo 'Please be patient. Services take several seconds to spin up.'",
"docker:down": "docker-compose down",
"docker:down:dump": "npm run docker:db:dump -s && npm run docker:down -s",
"docker:shell": "npm run docker:shell:wordpress",
"docker:shell:wordpress": "docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=$(basename $(pwd) | sed -e 's/[^a-z0-9]//g')_wordpress_1\") bash",
"docker:shell:db": "docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=$(basename $(pwd) | sed -e 's/[^a-z0-9]//g')_db_1\") bash",
"docker:db:dump": "npm run docker:db:dump:schema -s && npm run docker:db:dump:data -s",
"docker:db:open": "sh ./db-open.sh -u root -p pass wordpress",
"docker:db:dump:schema": "npm run docker:db:roll:schema -s && echo dumping schema && docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=$(basename $(pwd) | sed -e 's/[^a-z0-9]//g')_db_1\") mysqldump -uroot -ppass --opt -d -B wordpress > $(pwd)/data/01-schema.sql",
"docker:db:dump:data": "npm run docker:db:roll:data -s && echo dumping data && docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=$(basename $(pwd) | sed -e 's/[^a-z0-9]//g')_db_1\") mysqldump -uroot -ppass --quick --single-transaction -t -n -B wordpress > $(pwd)/data/02-data.sql",
"docker:db:roll:schema": "if [ -f $(pwd)/data/01-schema.sql ]; then echo rolling schema && zip -j $(pwd)/data/01-schema-$(stat -f \"%Sm\" -t \"%Y-%m-%dT%H-%M-%S\" $(pwd)/data/01-schema.sql).zip $(pwd)/data/01-schema.sql; fi",
"docker:db:roll:data": "if [ -f $(pwd)/data/02-data.sql ]; then echo rolling data && zip -j $(pwd)/data/02-data-$(stat -f \"%Sm\" -t \"%Y-%m-%dT%H-%M-%S\" $(pwd)/data/02-data.sql).zip $(pwd)/data/02-data.sql; fi"
},
"author": "",
"license": "MIT"
}