-
Notifications
You must be signed in to change notification settings - Fork 3
/
package.json
27 lines (27 loc) · 3.94 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
{
"name": "onrr.gov-site",
"version": "0.1.0",
"author": "Chris Robey <[email protected]>",
"scripts": {
"ascii": "clear && echo \" ██████╗ ███╗ ██╗██████╗ ██████╗ \" && echo \"██╔═══██╗████╗ ██║██╔══██╗██╔══██╗\" && echo \"██║ ██║██╔██╗ ██║██████╔╝██████╔╝\" && echo \"██║ ██║██║╚██╗██║██╔══██╗██╔══██╗\" && echo \"╚██████╔╝██║ ╚████║██║ ██║██║ ██║\" && echo \" ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═╝\" && echo \"_______________________________________________________________\"",
"clean": "cd database && docker-compose down --rmi all --volumes --remove-orphans && docker-compose up -d && cd ../cms docker-compose down --rmi all --volumes --remove-orphans && docker-compose up -d",
"clear": "npm run ascii && cd database && docker-compose down --rmi all --volumes --remove-orphans && cd ../cms && docker-compose down --rmi all --volumes --remove-orphans && npx kill-port 8080 && echo \"Database and CMS cleared successfully.\"",
"cmstart": "cd cms && docker-compose up -d",
"dbbackup": "run-script-os",
"dbbackup:default": "docker exec -it database bash -c 'pg_dump -U directus -W -F t directus > ./backup/database_dump.pg'",
"dbbackup:windows": "winpty docker exec -it database bash -c 'pg_dump -U directus -W -F t directus > ./backup/database_dump.pg'",
"dbrestore": "docker exec -it database bash -c 'pg_restore -U directus --clean --no-owner --no-acl --dbname=directus ./backup/dev_database_backup.pg' || echo $?",
"dbstart": "cd database && docker-compose up -d",
"frontend": "cd frontend && npm run serve",
"init": "run-script-os",
"init:default": "npm run ascii && cd database && docker-compose up -d && cd ../cms && docker-compose up -d && cd ../ && npm run dbrestore && npm run frontend && echo \"$(tput setaf 3)Use $(tput setaf 1)npm run dbrestore $(tput setaf 3)to restore the database. \" && echo \"Use $(tput setaf 1)npm run restart$(tput setaf 3) to restart after the restore.\" && echo \"\" && echo \"$(tput sgr0)Database started successfully. Located at http://localhost:5432\" && echo \"CMS started successfully. Located at http://localhost:8055\" && echo \"Frontend started successfully. Located at http://localhost:8080\"",
"init:windows": "npm run ascii && cd database && docker-compose up -d && cd ../cms && docker-compose up -d && cd ../ && npm run dbrestore && npm run frontend && echo \"Use npm run dbrestore to restore the database. \" && echo \"Use npm run restart to restart after the restore.\" && echo \"\" && echo \"$Database started successfully. Located at http://localhost:5432\" && echo \"CMS started successfully. Located at http://localhost:8055\" && echo \"Frontend started successfully. Located at http://localhost:8080\"",
"psql": "docker exec -it database bash",
"restart": "npm run stop && npm run start",
"start": "npm run ascii && cd database && docker-compose up -d && cd ../cms && npm install && npm run start && cd ../ && npm run frontend && echo \"$(tput setaf 3)Use $(tput setaf 1)npm run dbrestore $(tput setaf 3)to restore the database. \" && echo \"Use $(tput setaf 1)npm run restart$(tput setaf 3) to restart after the restore.\" && echo \"\" && echo \"$(tput sgr0)Database started successfully. Located at http://localhost:5432\" && echo \"CMS started successfully. Located at http://localhost:8055\" && echo \"Frontend started successfully. Located at http://localhost:8080\"",
"stop": "npm run ascii && cd cms && docker-compose down && cd ../database && docker-compose down && npx kill-port 8080 && echo \"Datbase, CMS, and Frontend stopped successfully.\""
},
"devDependencies": {
"run-script-os": "^1.1.6"
}
}