Last active
April 30, 2020 19:15
-
-
Save evzpav/52fa29a1cbd603bc5de6926ef8e7b649 to your computer and use it in GitHub Desktop.
Config to run Gatsby on Dokku
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#static.json on root project: | |
{ | |
"root": "public/", | |
"headers": { | |
"/**": { | |
"Cache-Control": "public, max-age=0, must-revalidate" | |
}, | |
"/**.css": { | |
"Cache-Control": "public, max-age=31536000, immutable" | |
}, | |
"/**.js": { | |
"Cache-Control": "public, max-age=31536000, immutable" | |
}, | |
"/static/**": { | |
"Cache-Control": "public, max-age=31536000, immutable" | |
}, | |
"/icons/*.png": { | |
"Cache-Control": "public, max-age=31536000, immutable" | |
} | |
}, | |
"https_only": true, | |
"error_page": "404.html" | |
} | |
#app.json on root project: | |
{ | |
"buildpacks": [ | |
{ | |
"url": "https://github.com/heroku/heroku-buildpack-nodejs" | |
}, | |
{ | |
"url": "https://github.com/heroku/heroku-buildpack-static" | |
} | |
] | |
} | |
#.buildpacks on root project: | |
https://github.com/heroku/heroku-buildpack-nodejs.git | |
https://github.com/heroku/heroku-buildpack-static.git | |
# create deploy script | |
echo " | |
#!/bin/bash | |
git add . | |
git commit -m \"up to dokku\" | |
git push dokku master " > up_dokku.sh | |
chmod 700 up_dokku.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment