improve build config for heroku
This commit is contained in:
parent
d3f463d801
commit
c0ef337a3d
6
app.json
6
app.json
@ -1,4 +1,3 @@
|
||||
|
||||
{
|
||||
"name": "ohmyform",
|
||||
"description": "Opensource alternative to TypeForm",
|
||||
@ -51,8 +50,5 @@
|
||||
{
|
||||
"url": "heroku/nodejs"
|
||||
}
|
||||
],
|
||||
"scripts": {
|
||||
"postdeploy": "scripts/heroku/postdeploy.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -6,5 +6,9 @@
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ohmyform/ohmyform.git"
|
||||
},
|
||||
"scripts": {
|
||||
"heroku-prebuild": "scripts/heroku/prebuild.sh",
|
||||
"heroku-postbuild": "scripts/heroku/postbuild.sh"
|
||||
}
|
||||
}
|
||||
|
9
scripts/heroku/postdeploy.sh → scripts/heroku/postbuild.sh
Normal file → Executable file
9
scripts/heroku/postdeploy.sh → scripts/heroku/postbuild.sh
Normal file → Executable file
@ -1,17 +1,11 @@
|
||||
|
||||
cd ui/
|
||||
|
||||
echo "Install UI"
|
||||
yarn install --frozen-lockfile
|
||||
|
||||
echo "Build and Export UI"
|
||||
yarn export
|
||||
|
||||
cd ../api
|
||||
|
||||
echo "Install API"
|
||||
yarn install --frozen-lockfile
|
||||
|
||||
echo "Copy Exported UI to API"
|
||||
cp -r ui/out public
|
||||
|
||||
@ -20,5 +14,4 @@ yarn install
|
||||
echo "Build API"
|
||||
yarn build
|
||||
|
||||
|
||||
echo "FINISHED build for UI and API"
|
||||
echo "FINISHED postbuild"
|
12
scripts/heroku/prebuild.sh
Executable file
12
scripts/heroku/prebuild.sh
Executable file
@ -0,0 +1,12 @@
|
||||
|
||||
cd ui/
|
||||
|
||||
echo "Install UI"
|
||||
yarn install --frozen-lockfile
|
||||
|
||||
cd ../api
|
||||
|
||||
echo "Install API"
|
||||
yarn install --frozen-lockfile
|
||||
|
||||
echo "FINISHED prebuild"
|
Loading…
x
Reference in New Issue
Block a user